DYNAMIC SQL WITH EXECUTE IMMEDIATE IN ORACLE PL/SQL WITH EXAMPLE
ฝัง
- เผยแพร่เมื่อ 21 ก.ย. 2024
- The audio and video now synced.
Ever tried creating a table inside a PL SQL block, or a function or a procedure? If yes, then you would know that it would raise an error, as DDL statements are not allowed inside a PL/SQL Block. So the solution to such a case, where you want to generate tables, or sequences or want to execute any DDL statement on the fly, then use synamic sql. Dynamic SQL statment will allow you to create state statements on the fly and then you can execute them using the execute immediate statement. This video tutorial demonstrates on this topic of using synamic sql with execute immediate in a PL/SQL block.
Why do you start with :B?
Nice explanation. Thanks. Please share chat transcript or at least share script used in the demo, to try on a test box. Appreciate your comment on this.
thanks, good one
We cannot use bind variables with DDL statements.... Correct me... If I'm wrong
Can you do another video case statement with dynamic PL/SQL, Please with some Regex Expression.
How to pass table name as parameter?