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 the difference between normal select query and currosor
What is a SELECT statement?
we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?
What is bind in db2?
How do you prepare a COBOL + DB2 program from coading till execution ?
Can we insert update delete in view?
db2 restart logic ?
What are the contents of a dclmgen?
what is the sqlcode -501
PLAN IS EXECUTABLE AND PACKAGE IS NOT EXECUTABLE . THEN WHAT IS THE USE OF PACKAGE?
2 Answers Tech Mahindra, Wipro,
Is db2 a mainframe database?
What are iseries servers?