Solved

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

Posted on 2009-04-01
3
884 Views
Last Modified: 2013-12-19
how to get 2nd record in the records returned in Oracle sql
0
Comment
Question by:umesh4exp
3 Comments
 
LVL 142

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now