# Junction Table

A table that represents a many-to-many relationship through foreign keys.

## What is **Junction Table** in a relational database?

**Junction Table** — A table that represents a many-to-many relationship through foreign keys.

```sql
CREATE TABLE enrollment (
    student_id INTEGER REFERENCES student (student_id),
    course_id INTEGER REFERENCES course (course_id),
    PRIMARY KEY (student_id, course_id)
);
```

Level: Journeyman · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/journeyman)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/junction-table
