1
Edsie 2020-12-02 18:31:52 +08:00
```
select t.*, case a.id when null then 'y' else 'n' end from (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('7654,7698,7782,7788',',',help_topic_id+1),',',-1) AS num FROM mysql.help_topic WHERE help_topic_id < LENGTH('7654,7698,7782,7788')-LENGTH(REPLACE('7654,7698,7782,7788',',',''))+1 ) t left join alldata a on a.id = t.num ``` |