Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

DATALENGTH (SQL Server Compact)

Returns the number of bytes used to represent any expression.


DATALENGTH ( expression ) 

expression

Is an expression of any data type.

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

SELECT DATALENGTH([Company Name]) AS Expr1, [Company Name]
FROM Customers
Show:
© 2015 Microsoft