Answer Posted / naresh
Basically Dynamic SQL means, you'll construct a SQL
statement dynamically while runtime and run it.
Why this needed: Since the stored database objects
(Procedures and Functions and others) will be compiled while
creating and stored inside a database.so everything has been
checked already. so whenever you make a call to these
programs they will directly run withou compiling second time.
since it runs without compiling you cannot use DDL commands
inside a stored program.
So to avoid this you can directly mention Execute Immediate
keywords in front of a SQL query dynamically in your
block.so that it'll work this time.
Hope this helps.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is snowflake sql?
What sql database should I use?
How to change sql*plus system settings?
What if we write return in procedure?
What is orm in sql?
What are the advantages of stored procedure?
what are the 'mysql' command line options? : Sql dba
Can a trigger call a stored procedure?
What trigger means?
What are different sql data types?
what is oracle database ? : Sql dba
What is null in pl/sql?
Explain the purpose of %type and %rowtype data types?
Can cursors be part of a trigger body?
What kind of join is join?