Home » SQL & PL/SQL » SQL & PL/SQL » ROW NUM (Oracle 9i)
ROW NUM [message #344539] Sat, 30 August 2008 06:45 Go to next message
k_kumar
Messages: 3
Registered: August 2008
Junior Member
Hi All,
I am new to this forum...
I need explaination..

select * from Table _Name where rownum<5
... works fine
but

select * from Table _Name where rownum>5 OR
select * from Table _Name where rownum=5 

doesn't work ....any guess ?
Re: ROW NUM [message #344543 is a reply to message #344539] Sat, 30 August 2008 06:57 Go to previous messageGo to next message
pablolee
Messages: 2835
Registered: May 2007
Location: Scotland
Senior Member
Quote:
any guess ?

No guesses required, simply read the documentation which explains fully how ROWNUM behaves and you will understand. Read The Fine Manual
Re: ROW NUM [message #344558 is a reply to message #344539] Sat, 30 August 2008 10:04 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guidelines as stated in URL above

my car
doesn't work ....any guess ?

I am sorry the Search function on this forum is broken for you.

Please do not waste your time here until after it has been repaired.

[Updated on: Sat, 30 August 2008 10:05] by Moderator

Report message to a moderator

Re: ROW NUM [message #344605 is a reply to message #344539] Sat, 30 August 2008 23:41 Go to previous message
Barbara Boehmer
Messages: 8635
Registered: November 2002
Location: California, USA
Senior Member
Tom Kyte provides a nice explanation of why that doesn't work and how rownum is applied in the first link below and the proper way to use rownum in the second link below.

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:62364503028143

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:127412348064
Previous Topic: ORA-00937: not a single-group group function
Next Topic: Creating associative arrays
Goto Forum:
  


Current Time: Fri Dec 09 01:56:23 CST 2016

Total time taken to generate the page: 0.10391 seconds