Pergunta de entrevista da empresa Tata Consultancy Services

Technical Question : - Write a SQL query to get the second highest salary from an EMPLOYEE table.

Resposta da entrevista

Sigiloso

27 de jun. de 2012

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