What is the difference between static and dynamic SQL?
Answer Posted / 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 View All Answers
Mention a credible reason why select* is never given preference in an sql program that has been embedded.
What does db2 mean?
What is host variable in db2 cobol?
What is rebind in db2?
What is the advantage in De-normalizing tables in DB2?
What is table space in db2?
What is runstats db2?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
What is bind package and plan in db2?
What does db2 blu stand for?
How to find the number of rows in db2 tables?
How do I copy a table in db2?
What is explain in db2?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
What is sqlca’s maximum length?