End of Summer - hours only!Up to 80% off on all courses and bundles.-Close
SQL Basics


Perfect! We used the equality sign in the previous example to show employees from Accounting. Now, we'd like to see all employees but those from Accounting. How do we do that?

FROM employee
WHERE department != 'Accounting';

We simply change = to !=, which means "not equal to". As a result, the query above will show all employees except for those who work in accounting.


The hotels in Paris turned out to be very expensive, so the German couple would like to visit another city instead. They will be satisfied with any city other than Berlin, which is where they live.

Select all the information from the hotel table for hotels which aren't in Berlin.

Stuck? Here's a hint!


FROM hotel
WHERE city != 'Berlin';