declare @i intselect @i=max(规格个数) from aset rowcount @i select id=identity(int,1,1),1 into # from syscolumns select id from # where id not in(select 规格排序 from b) set rowcount 0
select colid from syscolumns where id=object_id('syscolumns') and colid<=10 and colid not in (select 规格排序 from B表) order by 1
select max(colid) from syscolumns where id=object_id('syscolumns') 用这个只有32列,要是超过32列该咋办啊???
select id=identity(int,1,1),1 into # from syscolumns
select id from # where id not in(select 规格排序 from b)
set rowcount 0
用这个只有32列,要是超过32列该咋办啊???