What is the diff between Dynamic queries and static queries



What is the diff between Dynamic queries and static queries ..

Answer / jerry joseph

Static query will be executed as it is.

Dynamic query is built upon conditions depending upon the
parameters.

Static query will create an execution plan during compilation.

Dynamic query will create execution plan at run time.
Its very slow in execution since building the plan at run
time makes it too slow.

Is This Answer Correct ?    17 Yes 2 No

Post New Answer

More SQL Server Interview Questions

What is a unique index?

0 Answers  


What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELECT * FROM EMPLOYEE WHERE EMPID IN (123) WHAT IS THE DIFFERENCE?

15 Answers   Adsys, Cap Gemini,


How to send email from database?

0 Answers  


How to find the list of fixed hard drive and free space on server?

0 Answers  


Explain what is public role in sql server?

0 Answers  






Their are two tables 'A' and'B'.Table 'A' contains 3 columns named 'eid','ename','dept'. Table 'B'contains 3 columns named'sid','designation','salary'. We have to retrieve the names of employees working in the same department,same designation and same salary. Its urgent can anyone help me out in this problem.

6 Answers   Tech Mahindra,


Explain Geometry datatype in sql server 2008 with example

0 Answers   Infosys,


How do you Implement SSIS Packages in your Project?

0 Answers  


What does normalization do to data?

0 Answers  


What kind of problems occurs if we do not implement proper locking strategy?

0 Answers  


diffrence between Cluster Index and non Cluster Index

3 Answers   Wipro,


how to find the second salary?

10 Answers   HCL, Prithvi,


Categories