Click here to Skip to main content
15,075,806 members
Articles / Database Development / MySQL
Tip/Trick
Posted 6 May 2011

Tagged as

Stats

23.4K views
10 bookmarked

Select a column in a comma separated row in SQL

Rate me:
Please Sign up or sign in to vote.
4.29/5 (6 votes)
9 May 2011CPOL
How to select a column from a comma separated row in SQL
SQL
declare @list varchar(max)
select @list=COALESCE(@list+', ','')+ COLUMN_1 from TABLE_1
select @list

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

eceramanan
India India
No Biography provided

Comments and Discussions

 
GeneralHi, fix the typos in the Tip/Trick title Replace <b>coloumn<... Pin
thatraja6-May-11 7:38
professionalthatraja6-May-11 7:38 
GeneralRe: Thanks. Pin
eceramanan9-May-11 22:54
Membereceramanan9-May-11 22:54 
GeneralNice one Pin
Toniyo Jackson6-May-11 2:43
MemberToniyo Jackson6-May-11 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.