mysql - Retrieve rows in which a coloumn doesn't contain a value -
i have mysql table below:
| id | userids --------------- | 1 | 4,3,5 | 2 | 2,3 | 3 | 1,2,3
i want retrieve rows in userids doesn't contain 1. tried
select * tablename 1 not in (userids)
but not working. help?
use find_in_set
select * tablename find_in_set(1, userids) = 0
Comments
Post a Comment