除了这列外,还是否有其他列?如ID. 如果ID对应18个16为1至18.delete from tb where id <=13 and 此列 = 16
select * into #Temp from 我的表 where 有一列数据=16 delete from 我的表 where 有一列数据=16 insert into 我的表 select top 5 * from #Temp order by newid()--随机保留五列 drop table #Temp
用这个 delete from tb where id <=13 and 此列 = 16 和 select * into #Temp from 我的表 where 有一列数据=16 delete from 我的表 where 有一列数据=16 insert into 我的表 select top 5 * from #Temp order by newid()--随机保留五列 drop table #Temp 都不是随机保留啊,前者指定了id,后者是top 5以外的,"--随机保留五列"是笔误
如果ID对应18个16为1至18.delete from tb where id <=13 and 此列 = 16
delete from 我的表 where 有一列数据=16
insert into 我的表 select top 5 * from #Temp order by newid()--随机保留五列
drop table #Temp
delete from tb where id <=13 and 此列 = 16
和
select * into #Temp from 我的表 where 有一列数据=16
delete from 我的表 where 有一列数据=16
insert into 我的表 select top 5 * from #Temp order by newid()--随机保留五列
drop table #Temp
都不是随机保留啊,前者指定了id,后者是top 5以外的,"--随机保留五列"是笔误