Dynamic SQL / Can we use DDL,DCL commands in Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation
Normally DDL,DCL commands are not allow in PLSQL block. but by using dynamic SQL we can use DDL,DCL commands in PLSQL block.
In this case we can use execute immediate clause. In this execute immediate clause we can use DDL,DCL within single quote.
Uses of dynamic SQL:
1) For dropping all indexes at a time.
2) Dynamic SQL is used in bulk exception. when we using bulk insert and executing program more number of times then data is displayed that number of times. so we need to truncate table but truncate is DDL which not allow to use in PLSQL block. so by using dynamic SQL
We can use this DDL command in PLSQL block. After this if we execute program more number of times also data will be displayed only once.
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
3 Comments
propanfraco-1985 Matt Mueller https://wakelet.com/wake/uQuEvIZh8pJMk0iZ1lhon
ReplyDeletedephopilsblos
tempbi0prin_ki-2001 Ean Cummings There
ReplyDeleteVMware Player
Autodesk Maya
studunansu
OinexFrari Keith Carouthers Software
ReplyDeleteAwesome
essoifracal