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
Describe sql comments?
What are the different sql languages?
How can the performance of a trigger be improved?
What is union and union all keyword in sql and what are their differences?
What is procedure function?
Is sqlexception checked or unchecked?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
What are local and global variables and their differences?
What is insert command in sql?
what are set operators in sql? : Sql dba
Define commit, rollback and savepoint?
What are sql queries used for?
Which data dictionary views have the information on the triggers that are available in the database?
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
Write a sql query to convert all character to uppercase after hypen.