且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL-使用部分字符串匹配中的表进行JOIN

更新时间:2023-02-11 15:19:09

我认为您希望模式与其他方式匹配.也就是说,产品名称应包含产品缩写:

I think that you want the pattern matching the other way around. That is, the product name should contain the product abbreviation:

LEFT JOIN `product_abbreviations` AS `pa` 
    ON `op`.`name` LIKE CONCAT('%', `pa`.`product_name` ,'%')