Описание тега datalength

DATALENGTH is a T-SQL function in SQL Server 2005+ which takes any column or variable, and returns the length of the data in bytes.

DATALENGTH is a T-SQL function in SQL Server 2005+ which takes any column or variable, and returns the length of the data in bytes.

Usually returns an int, but can return a bigint if used with varchar(max), nvarchar(max) or varbinary(max) datatypes.

It is comparable to the LEN function, but LEN trims the input, whereas DATALENGTH does not.