Here is my column data:
Table Name: Employee
id path
1 1,5,8,9,6,32,3
Now I need the Regexp query which will return true if specific number exist in Path column.
SELECT * FROM `Employee` WHERE `path` REGEXP '(^|,)(1|5|8|9|6|32|3)(,|$)'
尝试这个。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.