Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL SQL-Server Oracle
Hi in my new project we are using dynamic and static sql (inside procedure). but still i dont know what is the difference?
What is the use of Dynamic sql? Both case we are passing parameters from front end then why this dyanmic query ?
where is the use?
Posted 4-Feb-13 21:35pm
Kavitha_b1.3K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Static queries run within the security context of the calling code (stored procedure, function etc.), dynamic queries run with the users access permissions.
 
Dynamic queries are used when you don't know the exact sql, for example when you might change columns or where clauses etc. at runtime.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100