What is dynamic SQl and how you will create and execute
dynamic sql?

Answer Posted / raksha

Dynamic SQL enables you to write programs that reference SQL statements whose full text is not known until runtime.

Below is the way to execute dynamic sql

EXECUTE IMMEDIATE 'SELECT d.id, e.name FROM dept_new d, TABLE(d.emps) e -- not allowed in static SQL
-- in PL/SQL
WHERE e.id = 1'

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Advantages and disadvantages of stored procedure?

576


Why do you partition data?

530


What happens when a trigger is associated to a view?

496


How to check if a column is nullable before setting to nullable?

580


what happens if you no create privilege in a database? : Sql dba

527






Is oracle sql free?

534


Why commit is not used in triggers?

574


Why left join is used in sql?

514


How we can update the view?

597


What is the purpose of cursors in pl/sql?

631


how to get a list of columns in an existing table? : Sql dba

536


What is database white box testing and black box testing?

634


how tsql statements can be written and submitted to the database engine? : Transact sql

526


what is a constraint? : Sql dba

708


Show code of a cursor for loop.

578