What is the procedure to write the query to list the highest salary of three




The following is the query to find out the top three salaries
in ORACLE:--(take emptable)
select * from emp e where 3>(select count (*) from emp where
e.sal>emp.sal) order by sal desc.
in SQL Server:-(take emp table)
select top 10 sal from emp

No comments:

Post a Comment