某一項目需要批量轉換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
查看本欄目