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


find out first highest salary?

Answers were Sorted based on User's Feedback



find out first highest salary?..

Answer / la

select max(sal) from emp;

Is This Answer Correct ?    15 Yes 2 No

find out first highest salary?..

Answer / surya

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

Answer / chandiran

select max(sal) from Employee

Is This Answer Correct ?    7 Yes 0 No

find out first highest salary?..

Answer / samir kumar sahoo

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

Answer / ela tiku

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

Answer / tulasi

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

Answer / mak

it's right

Is This Answer Correct ?    3 Yes 1 No

find out first highest salary?..

Answer / o p yadav

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

Answer / vali

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

Answer / suren

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

Post New Answer

More Oracle General Interview Questions

How to test null values?

0 Answers  


How to export several tables together?

0 Answers  


what r tyhe major differences between oracle 9i & 10g?

6 Answers  


What is the oracle implicit cursor?

0 Answers  


What are the differences between number and binary_float in oracle?

0 Answers  


hai, when to use char and varchar2....?

2 Answers  


how can db_files > maxdatafiles since db_files is for instance and the later is for database

0 Answers   CTS,


What is ordinary table in oracle?

0 Answers   MCN Solutions,


What are the different type of Segments ?

2 Answers  


How to save query output to a local file?

0 Answers  


What is the difference between online and offline backups?

0 Answers   MCN Solutions,


what is the difference between restoring and recovering?

0 Answers   MCN Solutions,


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)