Solved

how to get 2nd record in the records returned in Oracle

Posted on 2009-04-01
3
891 Views
Last Modified: 2013-12-19
how to get 2nd record in the records returned in Oracle sql
0
Comment
Question by:umesh4exp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 24047177
you will have to clarify a bit more, but it shall be along these lines:
select t.*
 from ( select d.*, row_number() over ( order by somefield ) r 
          from data_table d
      ) t
 where t.r = 2
         

Open in new window

0
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 400 total points
ID: 24047701
You can even try :

select * from (
select d.*, rownum record_number  from your_tables d )
where record_number = 2
0
 
LVL 32

Expert Comment

by:awking00
ID: 24051380
What determines "2nd" record and what is the query for which you want it?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Via a live example, show how to take different types of Oracle backups using RMAN.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question