How Do I Trim Leading and Trailing Quote from MySQL Row?

℡╲_俬逩灬. 提交于 2019-11-28 18:27:27

Try:

UPDATE `example_table` 
   SET `title` = TRIM(BOTH '"' FROM `title`)

This query will updated your example_table to remove leading and trailing double quotes from the value of the title column.

If you don't want to update the table, but want to fetch the rows with double quotes removed, then use @Sam Dufel's answer.

Just change that to

SELECT TRIM(BOTH '"' FROM title) AS trimmed_title FROM `example_table` 

This solved my problem

UPDATE table_name SET column_name = REPLACE(column_name,'"','')

this works for me

select trim(both '"' from column_name) from table_name;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!