Page 1 of 1

Query where id is not equal to (WHERE id <> 6)

Posted: 27 May 2019, 14:16
by sonik
Have you ever needed a query where you search for all except one thing?
Here is an example of a query where you search for all except the number 6:

SELECT user_id, username FROM users WHERE user_id <> 6

If you have ten users with id from one to ten , number six won't be in the executed query.