oracle rownum

in oracle •  6 years ago 

SELECT ROWNUM, E.*
FROM EMP E
ORDER BY E.SAL DESC; -- CTRL + ENTER : 쿼리실행

SELECT ROWNUM, T.*
FROM (SELECT *
FROM EMP
ORDER BY SAL DESC) T;

SELECT *
FROM (SELECT ROWNUM AS RNUM, T.*
FROM (SELECT *
FROM EMP
ORDER BY SAL DESC) T)
WHERE RNUM >=5 AND RNUM <=7;

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

@miawoo, I gave you an upvote on your post! Please give me a follow and I will give you a follow in return and possible future votes!

Thank you in advance!

Nice one

good~