Len will trim the end of the string and count the length where as DATALENGTH just count the lenght,its doesn't trim :)
Below sample query and example
DECLARE @str VARCHAR(50)
SET @str='Arun Aravind '
SELECT LEN(@str) AS LenCount
SELECT DATALENGTH(@str) AS DataLengthCount
If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment