Difference between Embedded SQL and Dynamic SQL?

Showing Answers 1 - 3 of 3 Answers


  • Aug 14th, 2006

DIFFERENCE BETWEEN DYNAMIC(interactive) and STATIC(embedded) SQL :

The difference is the time at which the BIND occurs.

In static mode, the bind is done prior to the execution and is stored in a PLAN.

In dynamic mode, the BIND occurs at execution time.

This results in additional overhead which degrades performance.

This form of dynamic SQL will NOT be used in our environment


  • Feb 1st, 2010

STATIC sql(embedded) : It is hardcoded in the program itself and the changeable

                                       value is the value in the host variables.

DYNAMIC sql : It has the capability of changing the columns,tables during the

                          execution of prg.
                          It doesnt contain any host variables.

Embedded SQL -> Access Path is generated during BIND time. also table authorizations are checked during BIND (if VALIDATE(BIND) is used).

Dynamic SQL => Access path is generated during Run-time. Table authorizations can only be checked during run-time.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account

Send   Reset


Related Answered Questions


Related Open Questions