sql 查询如何将结果集 输出为一段字符串?

 

文件id集合

文件表、

 

 

SELECT CONCAT('2323',(SELECT 'dsfsd'),'232323');

SELECT CONCAT('2323',(SELECT file_ids FROM img_words WHERE INSTR(toutiao_publisher_id_list,'232334')),'232323');

SELECT * FROM toutiao_file WHERE INSTR(( SELECT file_ids FROM img_words WHERE INSTR(toutiao_id_list,'232334')),id);

 

 

SELECT * FROM toutiao_file WHERE INSTR(
(
SELECT CONCAT(',',(SELECT file_ids FROM img_words WHERE INSTR(toutiao_id_list,'5655')),',')

),id);

 

 

SELECT * FROM toutiao_file WHERE INSTR((SELECT CONCAT(',',(SELECT file_ids FROM img_words WHERE INSTR(toutiao_id_list,'5435')),',') ),CONCAT(',',id,','));

 

posted @ 2018-01-15 12:06  papering  阅读(877)  评论(0编辑  收藏  举报