Finding nth Highest Value in Table
In many interviews you may get these kind of questions so here is different way to solve this
I. Enter to Database
Use Employee ;
II. Display all the details of Employee table
Select * from tblEmployee;
III. To Find Nth Highest Salary in tblEmployee
IV. To Find 2nd Highest Salary in tblEmployee
V. To Find Lowest Salary in tblEmployee
VI. To Find 2nd Lowest Salary in tblEmployee
Resultant set:
Using Corelated Sub Query
VII. To Find Nth Highest Salary in tblEmployee
VIII. To Find 2nd Highest Salary in tblEmployee
Resultant set:
IX. To Find Lowest Salary in tblEmployee
Resultant set:
X. To Find 2nd Lowest Salary in tblEmployee
Hope you all understand how to find the Highest and lowest value in given table ..
Do have any query regarding my code you can comment below !!!
No comments:
Post a Comment