DB QUESTIONS

What is the Query for TOP 3 Employees Salary from Employee Table?

select * from Employee where Emp_Sal in
(select distinct top 3 Emp_Sal from Employee order by Emp_Sal desc)



What is the Query for Second highest salary from employee table?

select MAX(Emp_Sal) from Employee where Emp_Sal<(select max(Emp_Sal) from Employee)
or
SELECT TOP 1 Emp_Sal FROM (
  SELECT TOP 2 Emp_Sal FROM Employee
  ORDER BY Emp_Sal DESC
) AS em ORDER BY Emp_Sal ASC 


What is the Query for List of tables in Database?


USE Employee
 GO
 SELECT *
FROM sys.Tables
 GO
(or)
select * FROM  INFORMATION_SCHEMA.TABLES