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 check constraint in db2?
Can you use a select query in a loop to fetch multiple rows? If so what is the advantage of using a cursor?
If we keep the DCLGEN structure for a table in a copybook and include it in the COBOL program using the COPY statement, will there be any impact during compilation or at any stage of program execution?
1. what if null values retrived from database and no null indicator mentioned in query. What is sql code.
What is dbrm in db2 database?
wht happens if we close cursor with cursor with hold option?
in GDG: is it poosible to copy records from a file which utilizes some 100 cylinders to a gdg whose model is defined as trk(1,0) and also it possible to copy 100 bytes file to 80 bytes file?
How can you classify the locks in db2?
Is db2 a mainframe database?
What is the reason behind not using select * in embedded sql programs?
What is a NULL value? What are the pros and cons of using NULLS?
What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?