how to find the second highest salary from emp table?
Answer Posted / gurvinder
select max(sal)from emp where sal in(select sal from emp minus select max(sal) from emp);
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we insert in sql function?
How do we accept inputs from user during runtime?
What are conditional predicates?
What is the purpose of my sql?
How can triggers be used for the table auditing?
What are the various levels of constraints?
How does rowid help in running a query faster?
How can I make sql query run faster?
Explain the difference between sql and mysql.
How delete all data from table in sql?
What are the types of operators available in sql?
what are all the different types of indexes? : Sql dba
Explain the uses of a database trigger?
What are sql data types?
how does a local variable is defined using t-sql? : Transact sql