Thursday, December 30, 2010

SQL Server Interview Questions and Answers : Series 10

Question: What is the Limit of small date time function?
Answer: Max limit for small date time is 2079 and Min limit is 1900. More than this limit will end up in error.
Question: What is the @@error?
Answer: @@Error stores the error details when there is any error occurs while updating the data. It can be used in procedures to get the error details.
Question: What is the @@raise error?
Answer: @@Raise error to print the error message.
Question: What is the @@row count?
Answer: ROWCOUNT is used to check how many no of rows updated in the last transaction.
Question: What is Date Diff function?              
Answer: DATEDIFF function is used to get difference between two dates. Difference can be in mm sec day month’s year and other date part.
Question: What is Date Add Function?
Answer: DATEADD function is used to add dates. It can used to add days months or year in a date.
What is date part function?
Answer: Date part is used to get the part from a date time value.
What is coalesce function in SQL Server?
Answer: Coalesce is used as case statement. It checks expression and provide the value for the expression which is true at first

No comments:

Post a Comment