where clause with not in sql code example
Example 1: sql not equal
<> Not equal. Note: In some versions of SQL this operator may be written as !=
Example sql query:
1) Selecting groceries where price is not 20
SELECT * FROM Grocery WHERE Price <> 20;
Example 2: sql and
Used to join separate conditions within a WHERE clause.
Example: Returns events located in London, United Kingdom
SELECT * FROM events
WHERE host_country='United Kingdom' AND host_
city='London';