how to find the second highest salary from emp table?

Answer Posted / prasanthi

select * from (select rownum r,a.* from (select distinct
sal from emp order by sal desc)a)where r=&i

sql>enter i value(enter manually) 2

Is This Answer Correct ?    54 Yes 62 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is crud sql?

559


What is embedded sql what are its advantages?

515


Explain the steps needed to create the scheduled job?

573


What is trigger point?

552


What is db journal file?

528






Does truncate need commit?

524


What is pl sql script?

570


What is application trigger?

552


What are the parts of a sql statement?

565


What are local and global variables and their differences?

598


what is a constraint? Tell me about its various levels. : Sql dba

571


Why we use stored procedure instead of query?

544


Can I create table without primary key?

539


Is primary key a clustered index?

545


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

572