批量获取text字段的长度

项目,需要批量转换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

你可能感兴趣的:(Go)