How to read 2nd highest sal from EMP table?
Answer Posted / b.kumar
-- USING MS SQL SERVER
SELECT TOP 1 FROM
( SELECT DISTINCT TOP 2 FROM EMP ORDER BY SAL DESC) EMP
ORDER BY SAL ASC
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can primary key be a foreign key?
Is the primary key column of a table an index in ms sql server?
What is the most common type of join?
What is 2nf example?
Which joins are sql server default?
System variable and temporary variables
What is clustered vs nonclustered index?
How to rename databases in ms sql server?
When multiple after triggers are attached to sql table, how to control the order of execution?
What is correlated subquery in sql server?
How can we determine what objects a user-defined function depends upon?
Explain iaas, paas and saas?
What is faster join or union?
How to receive returning result from a query?
Do you know what is lock escalation?