Size of VARBINARY field in SQL Server 2005 Size of VARBINARY field in SQL Server 2005 sql-server sql-server

Size of VARBINARY field in SQL Server 2005


Actually, you can do this in T-SQL!

DATALENGTH(<fieldname>) will work on varbinary(max) fields.


The VARBINARY(MAX) field allocates variable length data up to just under 2GB in size.

You can use DATALENGTH() function to determine the length of the column content.

For example:

SELECT DATALENGTH(CompanyName), CompanyNameFROM Customers