View previous topic :: View next topic
|
Author |
Message |
murali1508
New User
Joined: 28 Jul 2005 Posts: 5
|
|
|
|
Hi All,
What is the Difference bitween Static and Dynamic SQL.
Regards,
Murali. |
|
Back to top |
|
|
ashokkumarsahu
New User
Joined: 03 Aug 2005 Posts: 5 Location: bangalore
|
|
|
|
In case of static call goth the called program and calling program are loaded into main memory at atime but in case of dynamic call called program is loaeded at the time of call only . |
|
Back to top |
|
|
sravani
New User
Joined: 17 Jul 2005 Posts: 2
|
|
|
|
Hi,
A static SQL is hard coded in the program/stored proc when the the columns and conditions to be used are fixed.
Dynamic SQL is used when the query need to be midfitied based on different conditions.
Preparing the dynamic SQL:
EXEC SQL
PREPARE DYNAMIC_CSR <Dynamic_Cursor_Name>
FROM :WS-DYNAM-SQL-AREA <working storage area definitions>
END-EXEC
Regards,
Sravani |
|
Back to top |
|
|
bonniem
New User
Joined: 09 Aug 2005 Posts: 67
|
|
|
|
Hi,
I would like to add one more point. Static SQL is bound at program preparation time whereas dynamic SQL is bound at run time. Which of course has lesser performance than static SQL. |
|
Back to top |
|
|
niranjan.sinha@gmail.com
New User
Joined: 16 Aug 2005 Posts: 1
|
|
|
|
1) For Static Call we use Compiler option NODYNM, But Dynamic Call we use Compiler option DYNAM.
2) For Static Call load module is very large,but for Dynamic call load module size is very small.
3) For Static call access path is created while compiling, but for Dynamic call access path is created at run time. |
|
Back to top |
|
|
|