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
How to select true false based on column value in sql server?
What is BCNF? How is it better than 2NF & 3NF?
Explain what are magic tables in sql server?
What is it unwise to create wide clustered index keys?
What is ddl command?
How to drop an existing table?
what are database files and filegroups? : Sql server database administration
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
How to change a login name in ms sql server?
What is ms sql server service broker?
Is it ok to shrink transaction log?
What are wait types?
Explain different types of collation sensitivity?
How many databases can we create in a single server?
Explain timestamp datatype?