C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Get a column value in a single coma separated string in SQL
WhatsApp
Kunal Vaishya
12y
6.6
k
0
2
25
Blog
We can get all values of a column in a single coma separated string this query.
Declare @id varchar(Max)
Select @id = coalesce(@id + ',' ,'') + Cast(ItCode as varchar(10)) From ItMast
Select @id
After you will get result like this
Single string with couma seprater in Sql
Recommended related topics
Membership not found