MySQL SELECT Statment to return 2 columns into 1
I have a table with the following columns
id, teamA_id, teamB_id
Will it be possible to do a MYSQL SELECT statement that gives both teamA_id and teamB_id in the same column?
EDIT
Consider th开发者_运维技巧is example
From
id, teamA_id, teamB_id
1, 21, 45
2, 34, 67
I need
Teams
21
45
34
67
SELECT teamA_id as 'Teams'
FROM Teams
UNION
SELECT teamB_id as 'Teams'
FROM Teams
精彩评论