sql - Full outer join between 2 tables using an additional table -
i have problem select. try join between 2 tables: items
, characters
. thing is, have third table items_history
. want select show items , characters and, if there's record, character had or has item, show it.
shortly speaking, want this:
id | character 4 | 5 | 10 | player1 12 | player1 12 | player2 13 | player3 20 | player2 | player4 | player5
my code right now:
select items.id, character.name items_history right join items on items.id = items_history.id right join characters on characters.name = items_history.name;
Comments
Post a Comment