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...


how to retrieve the top 3 salaries of the table using rownum

Answers were Sorted based on User's Feedback



how to retrieve the top 3 salaries of the table using rownum..

Answer / seema

select sal from (select distinct sal from emp order by sal
desc ) where rownum < 3;

Is This Answer Correct ?    1 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / kavitha

select employee_id,last_name,salary
from employees
where rownum <=3
order by salary desc

Is This Answer Correct ?    1 Yes 1 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / kamal

Hello Sir

I wana to see this that how to retrieve 3 top salary by
subqurey can you gave me this answer.

Thanks

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / saisravanthi

select salary from
(select salary,rownum from salary_tab
order by salary_tab desc)
where rownum < 4;

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / manoj tcs

select * from (select * from emp order by sal desc)
where rownum < 4;

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / raveendran

SELECT EMP_BASICS,ROWNUM FROM EMPLOYEE_MASTER WHERE
EMP_BASICS IS NOT NULL AND ROWNUM<=3 ORDER BY EMP_BASICS
DESC

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / k.thrilok kumar

select rownum, sal from (select * from emp order by sal
desc) where rownum<=3

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / rajnish chauhan

you can put any number on Rnk.

---Top 3 salary
SELECT ROWNUM,ename,sal
FROM (
SELECT ename,sal,rank() over(ORDER BY sal DESC)rnk
FROM emp)a WHERE rnk<4

-----Top 3 Salary only
SELECT ROWNUM,ename,sal
FROM (
SELECT ename,sal,rank() over(ORDER BY sal DESC)rnk
FROM emp)a WHERE rnk=3

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / debbie

select * from (select sal from emp order by sal desc)
where rownum<=3

Is This Answer Correct ?    0 Yes 0 No

how to retrieve the top 3 salaries of the table using rownum..

Answer / chiru

select sal from (select distinct sal from emp order
by sal desc)
where rownum<4 ;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Is nosql relational?

0 Answers  


What does <> sql mean?

0 Answers  


What is an emotional trigger?

0 Answers  


how to enter numeric values as hex numbers? : Sql dba

0 Answers  


What is where clause in sql?

0 Answers  


How to add new employee details in an employee_details table with the following details

0 Answers  


which operator is used in query for pattern matching? : Sql dba

0 Answers  


what is a cursor

9 Answers   IBM, TCS, Wipro,


How do you add a column to a table?

0 Answers  


what is a tablespace? : Sql dba

0 Answers  


What are the uses of merge?

0 Answers  


What is an index in sql with example?

0 Answers  


Categories