Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为日期的字段,其中包含这样的数据"27 Mar 2013, 28 Mar 2013, 29 Mar 2013"
"27 Mar 2013, 28 Mar 2013, 29 Mar 2013"
现在我需要编写查询以将数据更改为以下格式。
"27 Mar 2013,28 Mar 2013,29 Mar 2013".
"27 Mar 2013,28 Mar 2013,29 Mar 2013"
在 MySql 中,如何编写一个查询来替换空格,后面是逗号。
Give this a try,
SELECT REPLACE(columnName, ', ', ',')