I have a SQL query where I am getting value of column in list form.
Select STUFF((
Select Distinct ',' + QUOTENAME(visit_count)
From arms
Where armId= '@armIdValue'
FOR XML PATH(''), TYPE
).value('.', 'NVARCHAR(MAX)')
,1,1,'')
the value of visit_count column is 5, so I get result like this:
[1],[2],[3],[4],[5]
I tried to turn this query to run in MySQL but it's not accepting FOR XML.
Do any solutions ?