Click here to Skip to main content
13,042,630 members (78,334 online)
Rate this:
Please Sign up or sign in to vote.
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 20:35pm

1 solution

Rate this: bad
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
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