By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
CREATE TABLE
INSERT 0 5
| g_id | g_name |
|---|---|
| 1 | Horror |
| 2 | Sci-Fi |
| 3 | Action |
| 4 | Rom-Com |
| 5 | Comedy |
SELECT 5
INSERT 0 7
| m_id | m_name | m_genre | m_director |
|---|---|---|---|
| 1 | Rocky Horror | 1 | R_Horror_Dir |
| 2 | 2001, A Space Odessy | 2 | 2001_Dir |
| 3 | Rambo | 3 | Rambo_Dir |
| 4 | Terminator | 3 | Terminator_Dir |
| 5 | Die Hard | 3 | Die Hard_Dir |
| 6 | When Harry met Sally | 4 | HmS_Dir |
| 7 | Bridget Jone's Diary | 4 | BJD_Dir |
SELECT 7
| Movie name | m_director | Genre |
|---|---|---|
| Rocky Horror | R_Horror_Dir | Horror |
| 2001, A Space Odessy | 2001_Dir | Sci-Fi |
| Rambo | Rambo_Dir | Action |
| Terminator | Terminator_Dir | Action |
| Die Hard | Die Hard_Dir | Action |
| When Harry met Sally | HmS_Dir | Rom-Com |
| Bridget Jone's Diary | BJD_Dir | Rom-Com |
SELECT 7