What is the diff between Static Queries and Dynamic queries
give me some examples
Answer Posted / praveen
Static queries are the queries we normally use like SELECT *
FROM EMPLOYEE. where as dynamic queries can be built and
executed dynamically. sp_executesql system stored procedure
is used to execute dynamic sql statements.
Eg: sp_executesql N'select * from employee'
dynamic sql queries will take more time to execute when
compared to static queries
| Is This Answer Correct ? | 18 Yes | 5 No |
Post New Answer View All Answers
Explain the properties of subqueries in sql server?
What is the difference between for trigger and after trigger?
What are different types of database indexes?
What is SubQuery in SQL Server 2008
What is create statement?
What is the exact numeric data type in sql?
In how many ways you can invoke ssrs reports?
What is a deadlock and what is a live lock?
How many types of dimensions are there and what are they? : sql server analysis services, ssas
What is an active database?
How important do you consider cursors or while loops for a transactional database?
What are the different index configurations a table can have?
How to rebuild indexes with alter index ... Rebuild?
What is read committed?
What are the new features of sql server 2008 r2 reporting service?