怎么删除前十条数据

eversun820226 2007-01-05 02:53:57
我要做每删除10条记录提交一次,oracle里没有delete top 10 这个方法吗?
...全文
331 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
tgm78 2007-01-07
  • 打赏
  • 举报
回复
commit是提交事务,否则,dml的更新并没有写入数据库的数据文件,还在内存中
kasoo 2007-01-07
  • 打赏
  • 举报
回复
delect from table where rownum<11;
这样好象也行.

不明白snooper(snooper) 后面的commit;是什么意思?哪位讲下!

wy2000490 2007-01-07
  • 打赏
  • 举报
回复
用rownum
wiler 2007-01-05
  • 打赏
  • 举报
回复
snooper(snooper)正解
snooper 2007-01-05
  • 打赏
  • 举报
回复
delete from table where rowid in (Select rowid from table where rownum <=10);
commit;
tgm78 2007-01-05
  • 打赏
  • 举报
回复
举个例子:

select r,e.* from (select rownum r,last_name,salary from (
select last_name,salary from employees order by nvl(salary,0) desc)) e
where r <11;
eversun820226 2007-01-05
  • 打赏
  • 举报
回复
delete from T3TN01_REGUL_STK_WORK where id in(select top 10 id from T3TN01_REGUL_STK_WORK where PROC_FLG = '1')这句话有什么错
liwater 2007-01-05
  • 打赏
  • 举报
回复
delete from table1
where id in (select top 10 id from table1...)...

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧