NOT Operator1 / 10
Select brand and color from the suits table for all suits that are not black, using the NOT operator.
Notice that suit #4 doesn't show up. Because color is null, the comparison logic won't work.
Notice that suit #4 doesn't show up. Because color is null, the comparison logic won't work.
| suit_id | brand | color | price |
|---|---|---|---|
| 1 | Armani | Black | 1200 |
| 2 | Hugo Boss | Navy | 950 |
| 3 | Zara | Gray | 300 |
| 4 | Brooks Brothers | null | 1100 |
| 5 | SuitSupply | Black | 700 |
Ctrl+Enter to submit
NOT Operator - Free SQL Practice Online
Practise NOT Operator with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.