I have two Tables
TABLE 1
ID Name
1001 XYZ
1002 ABC
TABLE 2
ID GAME
1001 A
1001 B
1002 A
I want the outcome of two tables join as
ID NAME GAME1 GAME2
1001 XYZ A B
1002 ABC A
I tried with a simple join and it gives me multiple rows for 1001 and 1002
Query
SELECT t1.ID, t1.Name, t2.Game
FROM t1, t2
WHERE t1.ID = t2.ID
1001 A
1001 B
1002 A
NA
Actual O/P
1001 A
1001 B
1002 A
Expected O/P
ID NAME GAME1 GAME2
1001 XYZ A B
1002 ABC A