I’m trying to pivot a table so I can output the data as a CSV. I need to do something like this:
SELECT .... t1.`column_one`, t1.`column_two`, ...
Problem is that some of the columns are expected to contain commas, single quotes, and double quotes.
Is there a way to make something like this work:
SELECT .... t1.`foo's, "bar"`, ...
The above doesn’t work. Suggestions?
I’ve tested and can confirm that the following definitely works:
The only thing I could suggest is to place the table name between ` (backtick) characters.