- . JOIN, , , ,
. ,
play_id play_title play_category
1 All Well That Ends Well Comedy
2 As You Like It Comedy
3 Antony and Cleopatra Tragedy
4 Cymbeline Romance
5 Henry IV, Part 1 History
6 Henry IV, Part 2 History
JOIN. "", , . , "" "". :
play_category_id play_category_name
1 Comedy
2 Tragedy
3 History
4 Romance
"" ,
play_id play_title play_category
1 All Well That Ends Well 1
2 As You Like It 1
3 Antony and Cleopatra 2
4 Cymbeline 4
5 Henry IV, Part 1 3
6 Henry IV, Part 2 3
, .
, , . ( , play_category_id.)
JOIN.
SELECT play_id, play_title, play_category_name
FROM play
LEFT OUTER JOIN play_category ON play_category = play_category_id
JOINING, , , .
, .