Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sandeep
select top(1) a.salary
from
(
select top(2)sal
from
employee
order by salary desc
)a
order by a.salary asc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you determine the current isolation level? : Transact sql
When you have to use a default "rollback to" savepoint of plvlog?
How to use sql*plus built-in timers?
Which is better stored procedure or query?
Mention what pl/sql package consists of?
What is the difference between a primary key and a unique key?
What are predefined functions in sql?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
How is data stored on a disk?
Why do you partition data?
Explain sql data types?
how can I make a script that can be bi-language (supports english, german)? : Sql dba
What is difference between function and trigger?
Show how functions and procedures are called in a pl/sql block.
What is pivot query?