Spread the love

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 <> 6Code language: HTML, XML (xml)

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

Leave a Reply