SubQueryFind 2nd Highest Salary in SQL SERVER
There are multiple ways to find the second-highest salary in SQL
Creating Table:- The first step is to create a table
Then Inserting Values in Table
The above query will give you as shown below
So, we can find the Nth highest salary using the following methods
1, Using TOP Keyword
Then substitute the letter 'N" with 2 to find 2nd highest Salary
2, Using COmmon Table(CTE)
3, Using SubQuery
FIND THE 2ND HIGHEST SALARY in EACH DEPARTMENT
that's it DONE!.