Thursday, March 1, 2018

Most asked Interview questions in my sql

Find highest salary from a given table

select max(salary) from table;



Find second highest salary from a given table

select max(salary) from table where salary not in(select max(salary) from table);