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 a scheduled jobs or what is a scheduled tasks? : Sql dba
Can sql developer connect to db2?
What is record type in pl sql?
Is pl sql a scripting language?
Is sql a oracle?
Does a primary key have to be a number?
Define select, insert, create, delete, update, drop keywords
Explain cursor types?
Why plvtab is considered as the easiest way to access the pl/sql table?
What is the use of stored procedures?
What is date functions?
how many sql ddl commands are supported by 'mysql'? : Sql dba
What does select * from mean in sql?
Give the order of sql select?
Is not equal in sql?