一条DELETE语句
程序员文章站
2022-11-21 10:42:53
with w as( select id,row_number() over(order by id desc) as [row] from [t1] where code...
with w as(
select id,row_number() over(order by id desc) as [row]
from [t1]
where code=@code
)
delete from t1 from t1 s inner join w on s.id=w.id
where w.row>100;
select id,row_number() over(order by id desc) as [row]
from [t1]
where code=@code
)
delete from t1 from t1 s inner join w on s.id=w.id
where w.row>100;
上一篇: Python3多线程爬虫实例讲解代码
下一篇: 给老婆搓一条金项链