Click to Rate and Give Feedback
TechNet
TechNet Library
SQL Server
SQL Server 2008
 DATALENGTH (SQL Server Compact)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server Compact 3.5 Service Pack 1 Books Online
DATALENGTH (SQL Server Compact)

Returns the number of bytes used to represent any expression.

DATALENGTH ( expression ) 
expression

Is an expression of any data type.

int

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
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker