[Solved] How to use IN & NOT IN same query [closed]


You forgot to put the field name before “NOT IN” :

SELECT * FROM users WHERE username IN ('aniket27','deepakrajak','bhawana','Mehul13','sanchayeeta','shivajidutta','anamika_4a','parekh','anupamkumar') AND username NOT IN ('aniket27') ORDER BY id DESC LIMIT 2

solved How to use IN & NOT IN same query [closed]