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.
如果我写:
SELECT * FROM users WHERE themes LIKE '%3%'
从字段主题='1、2、3、4、5',如何写正确'%3'或'3%'或'%3%'
只是为了检查用户是否选择了这些主题之一
利用FIND_IN_SET
FIND_IN_SET
SELECT * FROM users WHERE FIND_IN_SET(3, themes) <> 0