what are Dynamic SQL statements?




Answers were Sorted based on User's Feedback



what are Dynamic SQL statements?..

Answer / tharanath.n

A SQL statement is dynamic if it is constructed
at runtime and then executed.
we can use ddl commands by dynamic sql, without we can't
use.

Is This Answer Correct ?    14 Yes 1 No

what are Dynamic SQL statements?..

Answer / soujanya

A SQL statement is dynamic if it is constructed
at runtime and then executed.

Is This Answer Correct ?    8 Yes 1 No

what are Dynamic SQL statements?..

Answer / srikanth

EXECUTE IMMEDIATE

Is This Answer Correct ?    8 Yes 1 No




what are Dynamic SQL statements?..

Answer / 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 ?    2 Yes 0 No

what are Dynamic SQL statements?..

Answer / brahmam

-> the combination of Sql and Plsql is called dynamic Sql.
when ever sql statements executed runtime then we are using
Execute immediate clause in executable section of the plsql block.

Is This Answer Correct ?    1 Yes 0 No

what are Dynamic SQL statements?..

Answer / thanvi

Both compilation and execution happens at the time.It will be useful where we don't know (the value of col_name or table_name) till runtime.
-Compilation means checks for the syntax.

Is This Answer Correct ?    0 Yes 0 No

what are Dynamic SQL statements?..

Answer / tharanath.n

A SQL statement is dynamic if it is constructed
at runtime and then executed.
we can use ddl commands by dynamic sql, without we can't
use.

Is This Answer Correct ?    0 Yes 1 No

what are Dynamic SQL statements?..

Answer / vishal kumar

Sql statement should be written in quotes like

'select table1.col1, tabel2.col2 from table1,table2 where
table1.col3=table2.col4'
and we can execute through below command "execute immidiate"
EXECUTE IMMEDIATE 'select table1.col1, tabel2.col2 from
table1,table2 where table1.col3=table2.col4'

it execute at runtime, means its not allowed as static.

Is This Answer Correct ?    0 Yes 2 No

what are Dynamic SQL statements?..

Answer / manoj

It take value dynamicaly at run time

Need:- If we need DDL in programming as "CREATE, INSERT"

.. It always written in single
quote " 'sql_statement ' " both end
with termination " ; "

Is This Answer Correct ?    0 Yes 5 No

Post New Answer



More SQL PLSQL Interview Questions

What does fetching a cursor do?

0 Answers  


I have done oracle 10g. I need a project knowledge. So if u please send a project how it should be done,Or you can send email link. I will be very grateful to u.

1 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4, sp5 then What type of Error You will find????

3 Answers   Infosys,


Can a view be mutating? If yes, then how?

0 Answers  






what is ref cursor in pl/sql?

3 Answers  


Does a user_objects view have an entry for a trigger?

0 Answers  


What is the importance of sqlcode and sqlerrm?

0 Answers  


Can i possible to see Table Details ? Ex : Table Name Date Time User Emp May/18/2010 12:59pm Scott

3 Answers  


How would you reference column values before and after you have inserted and deleted triggers?

0 Answers  


what is indexing, searching and user interface?

1 Answers   HCL,


how to retrieve last tree records from table? select *from emp where rownum > (select count(*)-3 from emp); i am using this query to get last three records from table but its not giving any output, so please tell me what is the error in this query.

16 Answers  






Categories