ROWNUM IN ORACLE

后端 未结 3 1509
灰色年华
灰色年华 2021-01-29 09:24

I want to retrive record at 4th position in ORACLE 9i. Can I compare ROWNUM=4 in the WHERE clause??

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 10:20

    why don't you try something like this :)

    select * from (select rownum sn, tn.* from tablename tn ) where sn=4
    

    here tablename is the name of your table and tn is the alias assigned to it.

提交回复
热议问题