Office Document APIs for .NET
ITIL Career Advice
PMP Career Advice
Android Intel XDK
Welcome Guest !
What is the output of select COALESCE(10, getdate()) as 'COALESCE' ?
on 11/13/2013 | Category:
Sql Server Interview questions
| Views: 7416 |
Select from following answers:
Coalesce evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL.
Here first not-null expression is 10. But why it returned 1900-01-11 00:00:00.000 ?
COALESCE follows the CASE expression rules and returns the data type of value with the HIGHEST PRECEDENCE.
Here DATETIME has highest precedence than int... So it adds 10 days to default date 1900-01-01 00:00:00.000 . In that way it returns 1900-01-11 00:00:00.000
Show Correct Answer
Many Interviews |
< Previous :
What is the output of select ISNULL(10, getdate()) ...
Next > :
Which of the following CANNOT be passed back as an ...
Comments or Responses
Login to post response
More Interview Questions by Bandi
Which of the following CANNOT be passed back as an output parameter fr ...
Which word is missing from the following statement to create a stored ...
Which of the following is the standard four-part naming convention whe ...
What is missing from the T-SQL statement below for creating and using ...
One table has historical transactions details. The table only has 10 c ...
Which of the following would be a correct way to call the stored proce ...
How can you add carriage returns to text when inserting into a table?
Which one of the following objects is a special kind of stored procedu ...
Latest Interview Questions
How does Garbage Collector works?
What is the maximum capacity of a DataTable in ADO.NET?
What is the use of Html.ValidationSummary helper method in ASP.NET MVC ...
How to write dashed attributes of html (5) element using ASP.NET MVC H ...
What is the use of ViewStart in ASP.NET MVC?
What different types of Scaffold templates are there in ASP.NET MVC?
you need to identify Is Always a number Is Always greater than a 65, ...
What is a Linked Server?