I have a query like this
SELECT user_id
FROM user
WHERE user_id NOT
IN (
FIND_IN_SET( user.user_id, '1,2,3,4,7,8,21,42,12' )
)
But its not working fine ,when the series is in continue then only it print the id not present
ex. as 1,2,3,4 is in continuous this ids are only not present in my result but i want the complete list not present in my list.
I am calling function in find in set
SELECT user_id
FROM user
WHERE user_id NOT
IN (
FIND_IN_SET( user.user_id, block_id(1) )
)
it gives me the string of comma separated values and when i pass the string
ex WHERE user_id NOT
IN (
‘1,2,3,4,5,7,8,9’
)
it ignore only the first value
so please help
1 Answer