alter table [Table] add id int identity(1,1) go declare @i int declare @sql varchar(1000) set @i=0 while @i<=39 begin set @sql=‘select * into [TB‘+ltrim(i)+‘] from [Table] where id between @i*50000+1 and (@i+1)*50000‘ exec(@sql) set @[email protected]+1 end
时间: 2024-10-08 10:44:37