CREATE TABLE tb (c1 int, c2 text)INSERT TB SELECT 1,'adsf3' UNION ALL SELECT 100,'we23' UNION ALL SELECT 2,'skfjdkjfsdkf9' UNION ALL SELECT 40,'kdsjfkiqeuriepm,xkfj13'select *,substring(c2,1,4) from tb drop table tb
功能是反过来的.有相应的函数?substring().这个不支持?
CREATE TABLE tb (c1 int, c2 text) c1 自动标识 declare @i int while len(@phone)<70 begin select @i=1 select substring(@phone,i,70) insert tb values substring(@phone,i,70) select @i=@i+1 end
SELECT 1,'adsf3' UNION ALL
SELECT 100,'we23' UNION ALL
SELECT 2,'skfjdkjfsdkf9' UNION ALL
SELECT 40,'kdsjfkiqeuriepm,xkfj13'select *,substring(c2,1,4) from tb
drop table tb
c1 自动标识
declare @i int
while len(@phone)<70
begin
select @i=1
select substring(@phone,i,70)
insert tb values substring(@phone,i,70)
select @i=@i+1
end