MySql

mysql like多个值

2022-01-30  本文已影响0人  Rinaloving
参考文档 https://blog.csdn.net/hs_shengxiaguangnian/article/details/112586059
// 原始
SELECT * FROM `tablename` where keyword like '%手机%' or keyword like '%漫画%' or keyword like '%嘿嘿%'  or keyword like '%直播%'

// 简化
SELECT * FROM `tablename` where  keyword REGEXP '动漫|漫画|嘿嘿|直播'


上一篇下一篇

猜你喜欢

热点阅读