how to find the second highest salary from emp table?

Answer Posted / barochia dharmesh

select Income from (
select Rank() over(order by Income desc) topRecord, Income
from (select distinct Income from tblName) tbl ) tbl2
where topRecord = 2

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is raw datatype in sql?

548


Is sql a scripting language?

513


What do you mean by query optimization?

545


What is the current version of postgresql?

552


Does normalization improve performance?

552






What is snowflake sql?

578


How is data stored in sql?

547


How many sectors are in a partition?

557


Why truncate is used in sql?

527


Why is sql important?

577


What is orm in sql?

533


What mean sql?

576


What is the purpose of my sql?

505


What is an alias command?

569


What is sqlerrd?

524