• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 897
  • Last Modified:

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

how to get 2nd record in the records returned in Oracle sql
0
umesh4exp
Asked:
umesh4exp
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
You can even try :

select * from (
select d.*, rownum record_number  from your_tables d )
where record_number = 2
0
 
awking00Commented:
What determines "2nd" record and what is the query for which you want it?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now