Reputation: 2774
I have this:
ColumnA ColumnB ColumnC
Dog Soda Book
CatIce Juice Notebook
Bird Water Pencil
Dog Water Notebook
By using this select:
select ColumnA, ColumnB, ColumnC from table
I wanna a list like this:
ColumnD
Bird
Book
Cat
Dog
Ice
Juice
Notebook
Pencil
Soda
Water
How can I do this? Thanks!
Upvotes: 1
Views: 100
Reputation: 12349
Use a UNION
SELECT ColumnA
FROM table
UNION
SELECT ColumnB
FROM table
UNION
SELECT columnC
FROM table
Upvotes: 2