Posts

Showing posts with the label Technical interview question is find out second highest salary from employee table

How to find out Second Highest Salary from the EMPLOYEE Table

Image
DataBase Name : Prac Table Name : Emp_Sal I already added a four tuples into a "Emp_Sal" table. I used SELECT query on "Emp_Sal" table. Result is, We have to find out Second highest salary from " Emp_Sal " table, this table include four tuples and clearly shows that Employee name "PQR" is Second highest salary.  So, Query is  this query shows, i used two variable "MainTable" And "Auxillary". I compare one table using two variable. I get appropriate result, OUTPUT: I am changing variable name, Instead of "MainTable" variable and "Auxillary" variable I used "e1" and "e2" variable respectively, Query is, This query successfully execute or not, let us see. I  find out second highest salary from "EMPLOYEE" table.