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
Mention a few common trace flags used with sql server?
How to verify a user name with sqlcmd tool?
what is a correlated sub-query? : Sql server database administration
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What is self join in sql server joins?
Determine how to use the inserted and deleted pseudo tables?
How do you trace the traffic hitting a sql server?
Explain a differential backup?
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
Where are sql server usernames and passwords stored in the sql server?
You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?
Explain an incremental backup?
Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?
What is etl - extraction, transformation, and loading?
What is the use of for clause?