Export (0) Print
Expand All

DATALENGTH

SQL Server 2000

Returns the number of bytes used to represent any expression.

Syntax
DATALENGTH ( expression ) 
Arguments
expression
Is an expression of any data type.
Return Types

int

Examples

The following example returns the DATALENGTH of each company name listed in the Customers table in the Northwind database.

SELECT DATALENGTH(CompanyName), CompanyName
FROM Customers

Show:
© 2014 Microsoft