0% found this document useful (0 votes)
33 views

SQL Joins: Database HND

This document discusses different types of SQL joins, including inner joins, left joins, right joins, and full outer joins. It provides examples of SQL queries using each type of join to select customer and order data from a customers table and orders table based on matching customer IDs. The examples show how each join type handles matching and non-matching record pairs between the tables.

Uploaded by

Noor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

SQL Joins: Database HND

This document discusses different types of SQL joins, including inner joins, left joins, right joins, and full outer joins. It provides examples of SQL queries using each type of join to select customer and order data from a customers table and orders table based on matching customer IDs. The examples show how each join type handles matching and non-matching record pairs between the tables.

Uploaded by

Noor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

SQL JOINS

Database HND
INNER JOIN

Orders
SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
INNER JOIN
ORDERS ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID;
LEFT JOIN

Orders
SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
LEFT JOIN
ORDERS ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID;
RIGHT JOIN

Orders
SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
RIGHT JOIN
ORDERS ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID;
FULL OUTER JOIN

Orders
SELECT
ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
FULL JOIN
ORDERS ON
CUSTOMERS.ID =
ORDERS.CUSTOMER_ID;
Now it’s your turn
App_info
id

categoryData
Cat_id Category App_id
1 Social 1
2 Entertainment 3
phoneDetails

ramDetails

You might also like