Here's a shortcut to create an update statement for all the fields in a table. You would fill in the table name and database name in the WHERE clause of the SQL statements below, then run the code and it will return a SQL statement that you could copy and then run.
For a separate update statement for each field in a table:
SELECT concat('UPDATE ', TABLE_NAME, ' SET ', COLUMN_NAME, ' = REPLACE(', COLUMN_NAME, ', ''?'', '''')')
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE TABLE_NAME = 'table_name' AND TABLE_SCHEMA = 'database_name';
For a single update statement for every field in a table. Put UPDATE table_name then paste the results of this SQL statement.
SELECT concat('SET ', COLUMN_NAME, ' = REPLACE(', COLUMN_NAME, ', ''?'', ''''),')
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE TABLE_NAME = 'table_name' AND TABLE_SCHEMA = 'database_name';
If you just wanted to do update char or varchar fields you could add this to your WHERE clause:
AND DATA_TYPE in ('char', 'varchar')
To do it for every table in a database, simply drop the TABLE_NAME logic from your WHERE clause.
UPDATE tableName SET column1 = REPLACE(column1,'"','\''),column2 = REPLACE(column2,'"','\'') ...*toUPDATEall columns. Hopefully this question helps others out also.