SQL Server 2008上varbinary(max)文件流的长度

问题描述:

是否有一些有效的方法来获取"varbinary(max)filestream"列中的数据长度? 我发现只有转换为varchar然后调用"LEN"函数的示例.

Is there some efficient way how to get length of data in "varbinary(max) filestream" column? I found only samples with conversion to varchar and then calling the "LEN" function.

SELECT
      length = DATALENGTH(Name),
      Name 
FROM 
      Production.Product 
ORDER BY 
      Name

返回用于表示任何表达式的字节数."

T-SQL和引用来自MSDN的 DATALENGTH(Transact-SQL)一个>库.

T-SQL and quote taken from MSDN's DATALENGTH (Transact-SQL) library.