代码改变世界

批量获取text字段的长度

2012-07-02 11:17  java环境变量  阅读(254)  评论(0编辑  收藏  举报

项目,需要批量转换text到varchar,需要批量获取varchar长度.

 

select MAX(DATALENGTH (paybeizhu )) as paybeizhu,
MAX(DATALENGTH (Flighty2 )) as Flighty2,
MAX(DATALENGTH (Flighty1 )) as Flighty1,
MAX(DATALENGTH (remarks )) as remarks,
MAX(DATALENGTH (rinfo )) as rinfo,
MAX(DATALENGTH (rlog )) as rlog
from dbo.Orders with(nolock)
go