Members
1) Farooq Mian
2) Rukhsana
3) Maryem
Table of Contents
• Inner Join
• Left Join
• Right Join
• Full Join
Topic :- Joins
Well often tables are related to each other with keys.
SQL joins are used to query data from two or more
tables, Based a relationship between certain
columns in these tables.
Join : Return rows when there is at least one match in
both tables.
Left Join : Returns all rows from the left table, even if
there are no matches in the right table.
Right Join : Returns all rows from the right table, even if
there are no matches in the left table.
Full Join : Return rows when there is a match in one of
the tables.
Perons Table
Orders Table
O_id Order_no P_id
1 77895 2
2 44441 3
3 99992 2
4 56789 3
5 113379 1
6 12355 1
P_id LastName FirstName Address City
1 Mian Farooq Shadman Lahore
2 Nawaz Fawad Walton Lahore
3 Mian Ahmed Gulberg Karachi
4 Ali Asad DHA Lahore

Database Join

  • 1.
    Members 1) Farooq Mian 2)Rukhsana 3) Maryem Table of Contents • Inner Join • Left Join • Right Join • Full Join Topic :- Joins
  • 2.
    Well often tablesare related to each other with keys. SQL joins are used to query data from two or more tables, Based a relationship between certain columns in these tables.
  • 3.
    Join : Returnrows when there is at least one match in both tables. Left Join : Returns all rows from the left table, even if there are no matches in the right table. Right Join : Returns all rows from the right table, even if there are no matches in the left table. Full Join : Return rows when there is a match in one of the tables.
  • 4.
    Perons Table Orders Table O_idOrder_no P_id 1 77895 2 2 44441 3 3 99992 2 4 56789 3 5 113379 1 6 12355 1 P_id LastName FirstName Address City 1 Mian Farooq Shadman Lahore 2 Nawaz Fawad Walton Lahore 3 Mian Ahmed Gulberg Karachi 4 Ali Asad DHA Lahore