Length of varbinary(max) filestream on SQL Server 2008

徘徊边缘 提交于 2020-01-13 09:51:06

问题


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.


回答1:


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

"Returns the number of bytes used to represent any expression."

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



来源:https://stackoverflow.com/questions/748165/length-of-varbinarymax-filestream-on-sql-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!