Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Select the Nth lowest value from a table?

Answers were Sorted based on User's Feedback



Select the Nth lowest value from a table?..

Answer / mahesh

select *from(select ename,sal,row_number()over(order by sal desc) rk from emp) where rk=2;

Is This Answer Correct ?    1 Yes 0 No

Select the Nth lowest value from a table?..

Answer / nishi

select level, min('col_name') from my_table where level = '&n' connect by prior

('col_name') <'col_name') group by level;

Example:

Given a table called emp with the following columns:

-- id number

-- name varchar2(20)

-- sal number

--

-- For the second lowest salary:

-- select level, min(sal) from emp

-- where level=2

-- connect by prior sal < sal

-- group by lev

Is This Answer Correct ?    0 Yes 0 No

Select the Nth lowest value from a table?..

Answer / venkat

select * from emp minus select * from emp where rownum <= (select count(*) - &n from emp);

Is This Answer Correct ?    0 Yes 0 No

Select the Nth lowest value from a table?..

Answer / basanti

select * from(select rownum,ename from employee order by rownum desc) where rownum<=5;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

how to i write the query 'NISHI' TO N I S H I

4 Answers   Attra, Metric Stream,


What is cursor

4 Answers   TCS,


DBMS vs. RDBMS

2 Answers   TCS,


State and explain the different types of data models?

0 Answers  


Difference between open_form and call_form in oracle.

0 Answers  


What is the difference between substr & instr functions?

0 Answers  


What WHERE CURRENT OF clause does in a cursor?

2 Answers  


How many types of tables supported by oracle?

0 Answers  


Is it possible to split the print reviewer into more than one region ?

0 Answers   Oracle,


What is COST-based approach to optimization ?

5 Answers  


What is a dead lock in oracle?

0 Answers  


How to load excel data sheet to oracle database

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)