I've got several records in a temp table, and I'd like to take a value from each record and add it to a variable, e.g.
color | caption
--------------------------------
red stop
blue state line
yellow yield
orange construction
var1 = 'red;blue;yellow;orange'
In MSSQL, I could do that this way:
-- MSSQL
select var1 = var1 + color
from signShapes
In MySQL, that doesn't work. I'd just get "orange."
-- mySQL
select var1 = concat(var1, color)
from signShapes
No, I know I could accomplish this with a cursor or a loop. I'm curious if I could do this without either, similarly to the MSSQL method.