select *

from (select emp.*,row_number() over(partition by deptno order by rownum) cn from emp)

where cn = 1;

posted on 2015-04-29 14:53  水月无痕  阅读(7108)  评论(0编辑  收藏  举报