select channel from tb_user where id='1'; 獲得如下結果 +-----------+ | channel | +-----------+ | 4,5,6,7,8 | +-----------+ 我想要個結果是 +-----------+ | channel | +-----------+ | '4','5','6','7','8' | +-----------+
select replace(concat('''',channel,''''),',',''',''') from tb_user where id='1';這樣麼
追問:select
結果是
| replace(concat('''',channel,''''),',',''',''') |
+------------------------------------------------+
| '4','5','6','7','8'
我只要| '4','5','6','7','8' | 這一行channel