Result: 15
SELECT DATALENGTH(' TipsMake.com ');
Result: 17
SELECT DATALENGTH(1234);
Result: 4
SELECT DATALENGTH('20-02-2019');
Result: 10
SELECT DATALENGTH(' ');
Result: 1
SELECT DATALENGTH('');
Result: 0
SELECT DATALENGTH(NULL);
Result: NULL
Previous article: Operator '+' in SQL Server
Next lesson: LEFT function in SQL Server
Lesley Montoya Update 25 May 2019
May be interested LEFT function in SQL Server the left function in sql server allows you to extract a substring from a large string, starting from the leftmost character.
LEN function in SQL Server the len function in sql server returns the length of the specified string. it is important that the len function does not include whitespace characters at the end of the string when calculating length.
LOWER function in SQL Server the article will explore and show you how to use the lower function in sql server to convert letters in a specified string to lowercase.
LTRIM function in SQL Server ltrim function in sql server is used to delete all space characters from the first position (left positions) of the string.
REPLACE function in SQL Server replace function in sql server is used to replace all occurrences of substring a to a new substring b in a given string.
RIGHT function in SQL Server the article will explore and guide you how to use the right function in sql server to extract some characters from the right side of a given string.