-- similar result for CHAR DECLARE @varString VARCHAR(20) SELECT @varString -- result is NULL -- similar result for DECIMAL, FLOAT and DATETIME DECLARE @varNumber INTEGER SELECT @varNumber -- result is NULL
Friday, 29 July 2011
Declared Variable has NULL as Default Value!
When we declare a variable, by default it has NULL as its default value. So, need to be careful when checking the variable's value.
Labels:
SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment