Reputation: 27
I'm want to combine address fields into 1.
address)100 noway ln
city) eastjablip
state) No
combined into: address) 100 noway ln, eastjablip, no
While leaving city and state intact. (needed for search option)
Thanks
Upvotes: 0
Views: 54
Reputation: 111349
Use concat_ws
("concatenate with separator")
SELECT CONCAT_WS(', ', address, city, state) ....
Upvotes: 3