Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / surajit pathak
select * from emp e1
where 2>(select count(1) from emp e2
where e2.sal>e1.sal)
order by sal desc
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Explain the purpose of %type and %rowtype data types with the example?
Can we create index on primary key?
What is basic structure of pl sql?
What are sql procedures?
What is dense_rank?
Is truncate ddl or dml?
what is “go” in t-sql? : Transact sql
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is trigger in pl sql?
What is embedded sql with example?
What is secondary key?
Does pl/sql support create command?
What do you mean by field in sql?
Explain lock escalation? : Transact sql
Where can I learn sql for free?