How To Join Tables in SQL | Tutorial For Beginners

preview_player
Показать описание
Namastey All,

Welcome to Select Star. This video aims to explain and simplify all the type of joins that we have in SQL. If you are a beginner in SQL, this is a must watch tutorial on SQL Joins, if you are at an intermediate or advance level you can watch to brush your skills.

Topics covered :

1. SQL JOINS : Uses and why to two or more tables in SQL.

2. INNER JOIN : Returns records that have matching values in both tables. It is the most common type of join.

3. LEFT JOIN (or LEFT OUTER JOIN) : Returns all records from the left table (table1), and the matched records from the right table (table2). The result is NULL from the right side if there is no match.

4. RIGHT JOIN (or RIGHT OUTER JOIN) : Returns all records when there is a match in either left (table1) or right (table2) table records. It returns NULL for missing matches on either side.

5. FULL JOIN (or FULL OUTER JOIN) : Definition: Retrieves common rows and then all remaining rows from left table as well as right table, and uses of full join and uses of full join.

6. CROSS JOIN : Returns the Cartesian product of the two tables. It combines each row of the first table with each row of the second table.

7. Number of rows after applying joins?

8. Primary Key : Its a column (or a group of columns) in a table that has unique records and no null values are allowed

9. Foreign Key : Its a column (or a group of columns) in a table that is a primary key in some other table. Basically used to used join two tables.

Not sharing script for table creation as you can do it yourself, if you don't know how to then visit :

Frequently asked question about joins in an interview :

Other questions :

Happy Querying

#sql #data #dataanalytics #dataanalyst #analysis #analyst #dataengineers #dataengineering #machinelearning #datascience #datascientist #machinelearningengineer #businessanalyst #businessanalyticsjobs #businessanalytics #sqlserver #sqltips #sqlforbeginners #postgres #postgresql #mssqlserver #mssql #oracle #mysql #mysqltutorials #database #databasedesign #databasemanagement
Рекомендации по теме
welcome to shbcf.ru