Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900