Professional Documents
Culture Documents
SQL Joins
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
join
SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column_name
WHERE condition;
A self JOIN is a regular join, but the table is
joined with itself.
SELECT column_name(s)
FROM table1 T1, table1 T2
WHERE condition;
Self Join
SQL DML Write an SQL query to fetch the list of employees with the same
salary.
The required query is:
Write an SQL query to show the second highest salary from a table.
The required query is:
Select max(Salary) from Worker where Salary not in (Select
max(Salary) from Worker);
For a video recap of
today’s content:
https://www.youtube.com/watch?v=9yeOJ0ZMUYw