The DISTINCT keyword - as the name implies - returns only <i>distinct</i> or <i>unique</i> values from the specified column(s). View the inventory table below, and see what comes back when you type:
Table inventory
| item_id | product_name | category | size | color |
|---|---|---|---|---|
| 1 | T-Shirt | Clothing | M | Red |
| 2 | T-Shirt | Clothing | L | Blue |
| 3 | Jeans | Clothing | M | Blue |
| 4 | Hat | Accessories | One Size | Black |
| 5 | Sneakers | Footwear | 10 | White |
| 6 | Boots | Footwear | 11 | Black |
SELECT DISTINCT - Unique Values - SQL Practice Online
Practise SELECT DISTINCT - Unique Values with 10 interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup and no install. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.