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 |
What is cursor stability?
Which component is responsible for db2 startup and shutdown?
What is the significance of DB2 free space and what parameters control it?
List some fields from sqlca?
what happend with out using Commit,when closing cursor and program?
Why cursor is used in db2?
What is commit in db2?
Under what circumstances will DB2 allow an SQL statement to update more than one primary key value at a time?
What's The Error Code For Unique Index Voilation?
what is the soft code for deadlock ?
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?
What is explain plan in db2?