how to get second highest salary in SQL(as/4000
Answer Posted / sreekanth
SELECT MIN(SAL)
FROM(SELECT DISTINCT SAL FROM EMP
ORDER BY SAL DESC)
WHERE ROWNUM <= :N
where n is the nth highest salary.
In most of the answers,our friends have written 'where
rownum=2',but this never retreives a row.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
State some properties of relational databases?
What is rtm stands for?
How many sql statements are used? Define them.
How is debugging done?
List out the acid properties and explain?
what are all types of user defined functions? : Sql dba
How can a function retun more than one value in oracle with proper example?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
How to check if a column is nullable before setting to nullable?
Which software is used for pl sql programming?
how many ways we can we find the current date using mysql? : Sql dba
Is sql dba a good career? : SQL DBA
What do you mean by stored procedures? How do we use it?
Can we use views in stored procedure?
What is sql keyword?