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

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...