Pages

Saturday 16 February 2013

LEN vs DATALENGTH in SQL Server

LEN() Function: It will return number of character in string that you mention without considering trailing space.

DATALENGTH() Function: It will return number of bytes used to represent the expression. So it will consider space as well in counting.

Please take a look at below image for more idea:




No comments:

Post a Comment