|
View previous topic :: View next topic
|
| Author |
Message |
a027412
New User

Joined: 05 Jul 2007 Posts: 40 Location: Minneapolis, MN
|
|
|
|
| Is it a safe assumption to say that any dynamic SQL will have "PREPARE" and/or "EXECUTE" keyword in it??? |
|
| Back to top |
|
 |
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
PREPARE is a must but not EXECUTE.
If the query is fixed and no changes are required in future like column additons then PREPARE is enough, otherwise EXECUTE is a must |
|
| Back to top |
|
 |
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 194 Location: chennai
|
|
|
|
Hi
| Quote: |
| PREPARE is a must but not EXECUTE. |
We can not come to a conclusion like this without going thru the requirement of the program. If the Dynamic Sql program is for NON-SELECT, we can say EXECUTE is a must not PREPARE. If it is Parameterized NON-SELECT, we need both PREPARE and EXECUTE. For Fixed list SELECT and Variable List SELECT, we do not need the EXECUTE statement but PREPARE is required.
Regards
Raghu |
|
| Back to top |
|
 |
|
|