美文网首页
解决字符串不能 select ... where in ()的问

解决字符串不能 select ... where in ()的问

作者: 尼尔君 | 来源:发表于2019-03-12 15:45 被阅读0次

/**

shop_brand :
    brand_name : 1,3,2,4,5


sku_attr_value:
    id,......
    1,.....
    2,.....
    3,.....
    4,.....
    5,.....

*/

select b.* from (select brand_name from shop_brand ) a left JOIN sku_attr_value b on FIND_IN_SET(b.id,a.brand_name)

相关文章

网友评论

      本文标题:解决字符串不能 select ... where in ()的问

      本文链接:https://www.haomeiwen.com/subject/kvrnpqtx.html