Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

find out first highest salary?

Answers were Sorted based on User's Feedback

find out first highest salary?..

select max(sal) from emp;

 Is This Answer Correct ? 15 Yes 2 No

find out first highest salary?..

select * from emp where &n-1=(select count(distinct sal)
from emp e where emp.sal<e.sal);

For example:-
If you enter n=1,it will display first highest salary
if you enter n=2,it will display second highest salary
......

if you enter n=nth,it will display nth salary

 Is This Answer Correct ? 9 Yes 0 No

find out first highest salary?..

select max(sal) from Employee

 Is This Answer Correct ? 7 Yes 0 No

find out first highest salary?..

SELECT DISTINCT salary FROM (SELECT DISTINCT salary,ROWNUM
rn FROM employee ORDER BY salary desc) WHERE rn=1;

 Is This Answer Correct ? 6 Yes 2 No

find out first highest salary?..

select max(sal) from emp

<<<assuming emp is the table name and sal is the column
name>>>

 Is This Answer Correct ? 4 Yes 0 No

find out first highest salary?..

select * from emp x where 1=(select count(distinct sal)
from emp y where x.sal<=y.sal);

query to find nth sal

select * from emp x where &n=(select count(distinct sal)
from emp y where x.sal<=y.sal);

 Is This Answer Correct ? 5 Yes 2 No

find out first highest salary?..

it's right

 Is This Answer Correct ? 3 Yes 1 No

find out first highest salary?..

select max (salary) from emp
emp is a table name and salary is a coloum name

 Is This Answer Correct ? 2 Yes 0 No

find out first highest salary?..

according to samir kumar sahoo we cant find ans i think
bcoz
if u enter rownum='x' u can not find the data
select * from emp where rownum=10
ans; no rows found

 Is This Answer Correct ? 1 Yes 0 No

find out first highest salary?..

hi Im SureRishi

SELECT *
FROM Employee E1
WHERE (4-1) = (
SELECT COUNT(DISTINCT(E2.Salary))
FROM Employee E2
WHERE E2.Salary > E1.Salary)

 Is This Answer Correct ? 1 Yes 0 No

More Oracle General Interview Questions

Are truncate and delete commands same? If so why?

What is truncate oracle?

How do I call oracle stored procedures that take no parameters?

What happens to the current transaction if a ddl statement is executed?

Give the different types of rollback segments.

Can select statements be used on views in oracle?

Is it possible to join two tables, that are in two different users (e.g. SCOTT and HR etc.),but im same database (e.g. ORCL)? If yes, then how it is possible? Explain with step by step procedure.

how to get required data from oracle source is like this ram_05_seetha lax_05_viswa bamr05frummy run_01_away sw_sas_trim i want my target data like ram_05_seetha lax_05_viswa to get data using %_05_% but it will give ram_05_seetha lax_05_viswa bamr05frummy how can i get my target data?

What is a Synonym ?

How to use existing values in update statements using oracle?

What happens if you set the sga too low in oracle?

What is oracle analytical function?

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