Home » SQL & PL/SQL » SQL & PL/SQL » SQL Query Issue (Oracle 10g, Windows 2003 Server)
SQL Query Issue [message #342879] Mon, 25 August 2008 07:47 Go to next message
naikjigar
Messages: 51
Registered: July 2008
Location: India
Member

can i write a query which will give me the first 10 record from the result,

something like

10 to 20 record

i tried

Select col1 from table1 where rownum between 10 to 20,

but unfortunately it behaves differently and return with no record. Sad

can anybody help me out solving this query.

I want to use it basically for paging.
Re: SQL Query Issue [message #342903 is a reply to message #342879] Mon, 25 August 2008 08:16 Go to previous messageGo to next message
flyboy
Messages: 1903
Registered: November 2006
Senior Member
Maybe you will find this post interesting: http://www.orafaq.com/forum/m/342663/96705/#msg_342663

The ROWNUM obtaining is fully described in the documentation, found e.g. online on http://tahiti.oracle.com/. Also searching this forum for ROWNUM may confirm it to you.
Keep in mind, that without any real column identifying order, every row may become "first" sometimes.
Re: SQL Query Issue [message #342964 is a reply to message #342903] Mon, 25 August 2008 12:09 Go to previous message
naikjigar
Messages: 51
Registered: July 2008
Location: India
Member

Ok.. i got you.. thanks a lot... Smile
Previous Topic: difference between "Create and replace", and "create"
Next Topic: SQL help
Goto Forum:
  


Current Time: Tue Feb 11 16:58:36 CST 2025