how to find the second highest salary from emp table?

Answer Posted / ashwini

select max(salary) from employee where salary < (select max(salary) from employee)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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


Is left join same as join?

524


what is csv? : Sql dba

578


What is natural join in sql?

537


Can we call procedure in select statement?

520






what is the difference between cluster and non cluster index? : Sql dba

557


What is latest version of sql?

527


What is the difference between count 1 and count (*) in a sql query?

501


What are packages in pl sql and also explain its advantages?

534


How do I add a database to sql?

582


Can function return multiple values in sql?

533


Which language is used in sql?

520


What is union and union all keyword in sql and what are their differences?

579


What packages(if any) has oracle provided for use by developers?

5034


How to know the last executed procedure?

591