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


Please Help Members By Posting Answers For Below Questions

What is bind plan?

808


Which is faster delete or truncate?

887


Describe major components of db2?

862


What do you mean by rollback?

761


Is db2 a mainframe?

795


What is load utility in db2?

908


What is the maximum size of a char data type in db2?

778


Which are the db2 tools to protect integrity of the database?

913


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1502


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

7490


What are types of indexes?

787


What type of database is db2?

720


What is drop table?

786


What is image copy in db2?

768


On which levels locks can be applied?

874