Database Joins in MySQL

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

1/7

flashcard set

Earn XP

Description and Tags

Flashcards covering the types of joins, their syntax, and usage in MySQL.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

Inner Join

Returns rows where the same data appears in both tables being joined.

2
New cards

Outer Join

Selects all data from one table and only matching data from a second table, showing null values for non-matching data.

3
New cards

Left Outer Join

Returns all rows from the first table (left table) and matching rows from the second table (right table). Non-matching rows from the right table will have null values.

4
New cards

Right Outer Join

Returns all rows from the second table (right table) and matching rows from the first table (left table). Non-matching rows from the left table will have null values.

5
New cards

ON clause in JOIN

Specifies the condition on which the tables are joined, indicating which columns will be matched across the tables. Critical for accurate results.

6
New cards

Synonyms for Inner Join in MySQL

join, inner join, and cross join.

7
New cards

Foreign Key

A column in one table that refers to the primary key of another table, enforcing data integrity and consistency between tables.

8
New cards

Why Explicitly Label Table Column?

It is best practice to explicitly label which table a column comes from when joining multiple tables. This is technically only required if two tables being joined have columns with the same name, but it is always good practice.