Domanda di colloquio di Tata Consultancy Services

Write a query to find second highest salary.

Risposte di colloquio

Anonimo

15 nov 2017

select max(salary) from tablename where salary<(select max(salary) from tablename);

Anonimo

15 nov 2017

select max(salary) from tablename where salary < (select max(salary) from tablename);

Anonimo

15 nov 2017

select max(salary) from tablename where salary (is less than)(<) (select max(salary) from tablename);