What is the difference between static and dynamic SQL?



What is the difference between static and dynamic SQL?..

Answer / jkb

In Stats SQL, the statement is prepared before the program
is executed and the operational form of the statement
persists beyond the execution of the program. A source
program containing static SQL statements must be processed
by an SQL precompiler before it is compiled. The
precompiler checks the syntax of the SQL statements, turns
them into host language comments, and generates host
language statements to invoke DB2.


A dynamic SQL statement is prepared during the execution of
an SQL application, and the operational form of the
statement is not persistent. The source form of the
statement is a character string passed to DB2 by an
application program using the static SQL statement PREPARE
or EXECUTE IMMEDIATE.

Is This Answer Correct ?    52 Yes 9 No

Post New Answer

More DB2 Interview Questions

what types of copies can be made with the COPY Utility ?

1 Answers  


What is package in cobol db2?

0 Answers  


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

0 Answers  


What is a db2 package?

0 Answers  


List out the three types of page locks that can be held.

0 Answers  


How to get Top 10 Salaries from a Table

11 Answers   Accenture, HTC,


What types of tables are there in the db2 database?

0 Answers  


Explain the function of data manager.

0 Answers  


What are the three DB2 date and time data types and their associated functions?

1 Answers  


Q4. How will you get the count of record without using COUNT verb in query?

2 Answers   IBM,


What are the contents of dclgen?

0 Answers  


what is difference between Plan and Package

1 Answers   Syntel,


Categories