Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のテーブルがあります。
プレーヤー
アイテム
Player.id=Item.player_id である Item テーブルのすべてのアイテムを使用して、Player テーブルからすべてのプレーヤーを選択するにはどうすればよいですか?
2 つのクエリが必要ですか? それともJOINこれに対処できますか?
JOIN
単純な結合が機能します。
SELECT DISTINCT P.ID, P.Name FROM Player P INNER JOIN Item I on (I.player_id = P.id)