Hi,
What is the result of below query?
SELECT 'ABC'
+ NULL
Ans: Null
Now If I want this result as 'ABC'
then what I have to do.
In this case we can use CONCAT_NULL_YIELDS_NULL
options in sql.
SET CONCAT_NULL_YIELDS_NULL OFF
SELECT 'ABC'
+ NULL
Now the above query will give us the result
'ABC'
Below are the values for CONCAT_NULL_YIELDS_NULL options
Required value : ON
Default server value : ON
Default OLE DB and ODBC value : ON
Default DB-Library value : OFF
Thanks,
RS
No comments:
Post a Comment