oracle 问题

面试遇到的几个问题:

oracle分页

select * from 

(select a.*,rownum row_num from 

(select * from mytable t order by t.id desc) a

) b where b.row_num between 1 and 10 

 

select * from

(select a.*,rownum row_num from

(select * from mytable t order by t.id desc) a
where rownum<=10

) b where b.row_num >= 1

 

oracle中删除重复的信息

delete * from staff where rowid in
(select rowid from staff where rowid not in
(select min(rowid),name from staff group by name)
) 

  oracle 中的函数 

你可能感兴趣的:(oracle,面试)