DBMS SQL JOINS

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

SQL JOIN

A clause used to combine rows from two or more tables based on a related column between them.

2
New cards

INNER JOIN

Returns only the rows where there is a match in both joined tables.

3
New cards

LEFT JOIN (LEFT OUTER JOIN)

Returns all rows from the left table and matched rows from the right table. If no match, NULLs are shown for the right side.

4
New cards

RIGHT JOIN (RIGHT OUTER JOIN)

Returns all rows from the right table and matched rows from the left table. If no match, NULLs are shown for the left side.

5
New cards

FULL OUTER JOIN

Returns all rows from both tables, with NULLs for unmatched rows on either side.

6
New cards

Join Condition

A condition (usually using ON) that defines how two tables should be matched based on related columns.

7
New cards

NULL in Joins

When a row from one table has no matching row in the other table, the unmatched columns return NULL.

8
New cards

Join Syntax (INNER JOIN)

SELECT *

FROM table1

INNER JOIN table2

ON table1.column = table2.column;

9
New cards

Cartesian Product

Occurs when tables are joined without a proper ON clause, resulting in every row of one table matched with every row of the other.

10
New cards

Practical Use of JOIN

Used to fetch related data from multiple tables, such as customers and their orders, or students and their courses.

11
New cards
12
New cards