What is dynamic SQl and how you will create and execute
dynamic sql?
Answer Posted / ravi singh
Dynamic SQL enables you to executes your SQL statement at run time on the basis of different conditions. They can be executed with the help of creating SQLs at run time. you can store your where clause or sql statements in variables and on the basis of requirements you can execute them.
Dynamic SQL comprises reference cursors.
for ex: open cursor for select a,b,c from table_name;
execute immediate 'select a,b from table_name'
you can store the result set into variables too.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Which is faster truncate or drop?
Can cursors be part of a trigger body?
Why query optimization is needed?
How can I get the number of records affected by a stored procedure?
what are sequences
What is the difference between a query and a report?
Can one improve the performance of sql*loader? : aql loader
can sql servers linked to other servers like oracle? : Sql dba
What is the difference between microsoft sql and mysql?
What is union, minus and interact commands?
How do I run pl sql in sql developer?
How do I write a cron which will run a sql query and mail the results to agroup?
What is the current version of postgresql?
What is the most common sql injection tool?
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba