Thursday, November 25, 2010

BETWEEN AND CONVERT

What happens when there are more characters in the output of a CONVERT call than specified ?
e.g. convert(nvarchar(10) , 123456789122345678)
select convert(nvarchar(10) , 123456789122345678)
Arithmetic overflow error converting expression to data type nvarchar.
select convert(nvarchar(10) , '123456789122345678')
=> '1234567891'
if O/P type is string then it is trucated to specified length
BETWEEN is inclusive or exclusive ?
->inclusive
BETWEEN does not support exclusive mode, you have to use > <
if any of the values in the range contain NULL, the result is UNKNOWN as per the documentation.
WHAT IS UNION, EXCEPT and INTERCEPT

No comments:

Post a Comment

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...