在 MySql 中,如何在 WHERE IN 子句中使用字符串函数?
例如:-
select * from product p left join catalog c on c.catalogid in ((TRIM(BOTH ',' FROM (REPLACE(p.catalog_ids,',,',',')))));
这里p.catalogs_ids=',36,,37,,38,';
但上面的查询结果
select * from product p left join catalog c on c.catalogid in ('36,37,38');
任何帮助将不胜感激。