SQL Server Interview Question and Answers

36. What is the difference between Triggers and Stored Procedure?
  Stored Procedures are called by the programmer wherever it wants to fire but triggers fired automatically when insert,delete,update occured. And triggers can be implemented to tables & views only where as stored procedure used in the database independently.
37. What are the properties of Sub–Query?
  • A subquery must be enclosed in the parenthesis.
  • A subquery must be put in the right hand of the comparison operator
  • A subquery cannot contain a ORDER-BY clause.
  • A query can contain more than one sub-queries.
38. Where are SQL server users names and passwords are stored in sql server?
  They get stored in master db in the sysxlogins table.
39. What are the types of subscriptions in SQL Server replication?
    There are two types of replication in sql server are :
  • Push
  • Pull
40. What does REVERT do in SQL Server 2005?
  Restores your previous execution context.If you have changed your execution context with EXECUTE AS, the REVERT statement will restore the last context prior to the EXECUTE AS.

Page 8 of 15