1

私は2つのテーブルを持っていtitleますterritory. テリトリーは、タイトルが利用可能な場所を教えてくれます:

`title`
- id
- name

`territory`
- title_id (FK)
- territory

出力を次のようにしたい:

id      name     territory     territory     territory     etc...
1       Titanic  US            GB            FR

私は現在INNER JOIN、上記の行を 1 行ではなく 3 行表示する を実行しています。

SELECT * FROM title inner join territory on title.id = territory.title_id

上記の出力では、タイトルごとに 1 つの行があり、すべての地域がその行に一覧表示されています。

4

1 に答える 1