Concat a string to SELECT * MySql

The Solution to Concat a string to SELECT * MySql is

You simply can't do that in SQL. You have to explicitly list the fields and concat each one:

SELECT CONCAT(field1, '/'), CONCAT(field2, '/'), ... FROM `socials` WHERE 1

If you are using an app, you can use SQL to read the column names, and then use your app to construct a query like above. See this stackoverflow question to find the column names: Get table column names in mysql?

~ Answered on 2012-11-25 12:37:56

Most Viewed Questions: