我在http://sqlfiddle.com/#!2/18aed1
中创建了我的代码我有两张桌子:
我需要使用name_group替换users表中的多个组,如下所示:
我的代码是:
SELECT
name,
(SELECT name_group FROM groups WHERE id IN (REPLACE(REPLACE(groups ,'{','') , '}',''))) AS groups
FROM `users`
演示:enter link description here
谢谢