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

Explain the disadvantages of cursors?

0 Answers  


Explain different backup plans?

0 Answers  


what are acid properties? : Sql server database administration

0 Answers  


table:employee EID ENAME MID(manager ids) 101 rama null 102 sita 101 103 siva 101 104 ganesh 103 . . . . . . for 103 ID the manager ID is 101(RAMA) and for 104 manager is SIVA if i give employee id (EID) you have to tell the manager for that EID write query? eample:if i give 102 .The query output should be manager for 102 ID that it should print RAMA as output

7 Answers  


What are the different ways of moving data/databases between servers and databases in SQL Server?

1 Answers  






what is a transaction and what are acid properties? : Sql server database administration

0 Answers  


What are scalar functions?

0 Answers  


What does the automatic recovery do?

0 Answers  


What do mean by xml datatype?

0 Answers  


What are the disadvantages of using the stored procedures?

0 Answers  


Does union all remove duplicates?

0 Answers  


How send email from database?.

3 Answers   CarrizalSoft Technologies, Merrill Lynch,


Categories