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 does dml mean?
What is pl sql and why it is used for?
What is error ora-12154: tns:could not resolve the connect identifier specified?
What are data types in pl sql?
How do I enable sql encryption?
how to get a list of all tables in a database? : Sql dba
How do you create an update query?
what is a unique key ? : Sql dba
How is pl sql different from sql?
What is a pdo connection?
What is the benefit of foreign key?
How do I order columns in sql?
What is meant by temporal data?
What is a boolean in sql?
how to calculate the difference between two dates? : Sql dba