删除前n条记录
选择前n条记录的sql为select * from 表名 fetch first n row only,
那么删除前n条记录的sql是什么呢?
[解决办法]
有主键的话
delete from tablename where id in (select id from tablename fetch first n row only)
这样不行吗?
发布时间: 2012-04-05 12:42:40 作者: rapoo
删除前n条记录
选择前n条记录的sql为select * from 表名 fetch first n row only,
那么删除前n条记录的sql是什么呢?
[解决办法]
有主键的话
delete from tablename where id in (select id from tablename fetch first n row only)
这样不行吗?