某一项目需要批量转换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
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/
时间: 2024-10-27 19:28:04