Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / anil_abbireddy
select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)
| Is This Answer Correct ? | 30 Yes | 8 No |
Post New Answer View All Answers
What are the advantages of stored procedure?
what is bcp? When is it used?
What is string join?
How to run sql statements through the web interface?
How do I install microsoft sql?
What are the various levels of constraints?
What are the two types of periodical indexes?
Explain how can you save or place your msg in a table?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
How do you update f as m and m as f from the below table testtable?
What is sql select statement?
Why is sql important?
Do we need commit after truncate?
Which version of sql do I have?
Are subqueries faster than joins?