SQLServer 截取函数 substring函数
declare @name char(1000) --注意:char(10)为10位,要是位数小了会让数据出错
set @name='s{sss}fc{fggh}dghdf{cccs}x'
select substring(@name,1,6) col

declare @name char(1000) --注意:char(10)为10位,要是位数小了会让数据出错
set @name='s{sss}fc{fggh}dghdf{cccs}x'
select substring(@name,1,6) col
