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 

but should rather change table design. never store multiple values in single column!


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -