Table A 中字段 item 是字符类的数据。 内容比如是: item1 item2 item3 ... Table B 中字段Key 与 New 也是字符类。 key1, new1 key2, new2 key3, new3 请问如何用一段SQL做到: 在table A中每一条item中的字符 查找 b表中的每一个key 并用相应的new 替换。 即:对应每一条内容item,有很多个关键字key需要用对应的新字符new替换。 如果一条条做太累了。 Update TableA SET item = REPLACE(item, 'key1', 'new1') ; Update TableA SET item = REPLACE(item, 'key2', 'new2') ; ... ... key 与new已经做在表B中了。能否用一条语句做到? |