In this video, we will solve one of the most commonly asked SQL interview questions: "How to Find the Second Highest Salary." This tutorial explains multiple methods to achieve this using SQL queries, such as the TOP, MAX, and ROW_NUMBER() approaches. Whether you’re preparing for a job interview or want to sharpen your SQL skills, this video provides a clear, step-by-step solution with practical examples.
CREATE TABLE Employee (
EmpID INT PRIMARY KEY,
EmpName VARCHAR(100),
Salary DECIMAL(10, 2)
);
INSERT INTO Employee (EmpID, EmpName, Salary)
VALUES
(1, 'John', 5000),
(2, 'Jane', 6000),
(3, 'Bob', 7000),
(4, 'Alice', 8000),
(5, 'Mike', 9000);
Tags:
SQL interview questions
SQL second highest salary
Find second highest salary in SQL
SQL top salary query
SQL Server interview
SQL for beginners
SQL practice problems
SQL query tutorial
SQL dense rank
SQL ranking functions
SQL DISTINCT
Second highest salary interview question
SQL Server tutorial