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

how can you attach more than 20 ldf files in sql server

1 Answers   IBM,


What is delete query?

1 Answers  


What is a file group?

1 Answers  


we have emp table like Ename,EDOJ,EDOB with Column structure.but we want to know the employee Age.How? Any Body Plz

6 Answers  


Suggest a method of joining two tables.

1 Answers   Ernst Young, Thomson Reuters,


What is sub query and its properties?

1 Answers  


Let’s say the table in the database is named as TBL_Register. The fields in this table include: 1. User_Name, 2. User_Telephone, 3. Register_Date The field Register_Date stores the current date and time of the registration. Write the SQL statement that inserts the data into the table.

2 Answers   Techno Solutions,


Wht is the difference between stored procedure and trigger

6 Answers   HCL, TCS,


What are transactions and its controls?

1 Answers  


can any one please send sql quries most used in applications.

2 Answers  


if 3 duplicate records in table,i want to delete 2 alternating duplicate records by keeping 1 duplicate and 1 original as it is,how?

2 Answers  


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

3 Answers   HCL,


Categories