是否满足你的要求..
create table tb(Col1 char(4))
declare @Col_Number int,@i int
declare @sql varchar(8000)
declare @value varchar(560)
set @Col_Number = 2
while @Col_Number<=140
begin
set @sql='alter table tb add Col'+cast(@Col_Number as varchar)+' char(4)'
exec(@sql)
set @Col_Number = @Col_Number+1
end
set @value=''
while len(@value)<560
begin
select @value=@value+stuff(rand(),1,2,'')
end
set @value=left(@value,560)
select @i=1,@sql=''
while @value<>''
begin
select @sql=@sql+left(@value,4)+''',''',
@value=substring(@value,5,560)
end
select @sql=''''+@sql,
@sql=left(@sql,len(@sql)-len(','''))
exec ('insert into tb select '+@sql)
select * from tb
drop table tb
/*
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13 Col14 Col15 Col16 Col17 Col18 Col19 Col20 Col21 Col22 Col23 Col24 Col25 Col26 Col27 Col28 Col29 Col30 Col31 Col32 Col33 Col34 Col35 Col36 Col37 Col38 Col39 Col40 Col41 Col42 Col43 Col44 Col45 Col46 Col47 Col48 Col49 Col50 Col51 Col52 Col53 Col54 Col55 Col56 Col57 Col58 Col59 Col60 Col61 Col62 Col63 Col64 Col65 Col66 Col67 Col68 Col69 Col70 Col71 Col72 Col73 Col74 Col75 Col76 Col77 Col78 Col79 Col80 Col81 Col82 Col83 Col84 Col85 Col86 Col87 Col88 Col89 Col90 Col91 Col92 Col93 Col94 Col95 Col96 Col97 Col98 Col99 Col100 Col101 Col102 Col103 Col104 Col105 Col106 Col107 Col108 Col109 Col110 Col111 Col112 Col113 Col114 Col115 Col116 Col117 Col118 Col119 Col120 Col121 Col122 Col123 Col124 Col125 Col126 Col127 Col128 Col129 Col130 Col131 Col132 Col133 Col134 Col135 Col136 Col137 Col138 Col139 Col140
---- ---- ---- ---- ---- ---- ---- ---- ---- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------
5358 4731 7291 6241 5850 2125 5051 6294 3412 8838
7194
8109
1060
4942
0438
4662
3192
8748
5694
8204
2803
6824
6779
4093
6345
9273
3103
5853
4180
2755
1701
2080
2980
9926
5573
0804
9058
5211
8048
4846
4698
2503
3925
8785
3316
2074
2889
4308
6979
7088
8281
5771
5586
9562
3723
7906
4522
0304
1442
6543
1811
2360
9160
9613
9453
3632
0436
8190
2489
5677
7948
6971
0645
4945
9176
8292
0879
4856
4956
8136
5397
6793
2984
2206
6742
1963
3627
6966
3977
7176
7616
5509
5387
6482
1179
8663
8038
0579
9428
6031
1549
7253
6762
9366
5239
5628
2130
2189
6915
6006
5510
3694
0559
8151
3425
6726
2621
8599
9040
1437
2937
2652
1575
3960
3100
9649
9681
6112
0355
3383
5078
0080
8267
8251
7728
4162
6223
8273
1788
0949
*/