how to find the second highest salary from emp table?

Answer Posted / winnie

select max(sal) from emp
where sal not in (select max(sal) from emp )

Is This Answer Correct ?    1090 Yes 131 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

646


how to create a new table by selecting rows from another table in mysql? : Sql dba

563


what is sql? : Sql dba

557


what is blob? : Sql dba

564


how many columns can be used for creating index? : Sql dba

521






What are the different schemas objects that can be created using pl/sql?

530


what are sequences

1097


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1726


What is function and procedure?

569


How do I partition in sql?

540


What is Materialized View? In What Scenario we Use Materialized View?

8528


how to create a new table in mysql? : Sql dba

549


How to handle bulk data?

891


Does access use sql?

565


What is the difference between left join and right join?

502