SQLTeam.com | Weblogs | Forums

Select data in one column


#1

hi,

i want to select to display all data in one column.
how to do that?
all below under status column.
select 'Redeemed', 'Expired', 'Unredeemed'`


#2

select column from yourtable


#3

Please post create table script and inserts with sample data, what queries you've tried and desired output for inserted sample data.


#4

is ok, i get it done by myself. thanks.

select 'Redeemed' as status union select 'Expired'as status union select 'Unredeemed' as status


#5

I don't suppose it matter for a small data set like that, but UNION ALL would be better if you KNOW that there are no duplicates (UNION will remove any duplicates, and that takes a some processing power to do, of course)