Reputation: 1219
How can I replace double quotes with single quotes:
I've tried:
UPDATE table SET COLUMN=REPLACE(COLUMN,'''',''')
but it didn't work.
Upvotes: 0
Views: 1292
Reputation: 32602
Try this:
UPDATE table SET COLUMN=REPLACE(COLUMN,'''''','''')
We have to escape the single quote. If you want to write '
you have to write ''
. For more see this.
Upvotes: 3
Reputation: 204766
You need to escape the quote. Try
UPDATE your_table SET col = REPLACE(col, '''''' ,'''')
Upvotes: 1