Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一个可以在字符串中查找值的查询。例如,我的列演示有以下 2 行:
1,2,121,43 343,21
我目前的查询是:
select * from table where demo like '%21%'
但是,这会返回两行。我想在字符串中查找完全匹配。
使用FIND_IN_SET()
select * from table where find_in_set(21, demo) > 0