SQL Server 2005中VARBINARY字段的大小 [英] Size of VARBINARY field in SQL Server 2005

查看:271
本文介绍了SQL Server 2005中VARBINARY字段的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SQL确定SQL Server 2005中 VARBINARY(MAX)字段中内容的字节大小。我怀疑对此是否有本地支持,是否可以使用CLR集成来完成?任何想法将不胜感激。

I am trying to determine the size in bytes of the contents in a VARBINARY(MAX) field in SQL Server 2005, using SQL. As I doubt there is native support for this, could it be done using CLR integration? Any ideas would be greatly appreciated.

推荐答案

实际上,您可以在T-SQL中做到这一点!

Actually, you can do this in T-SQL!

DATALENGTH(< fieldname>)将可用于 varbinary(max)字段。

这篇关于SQL Server 2005中VARBINARY字段的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆