SELECT DISTINCT - Unique Values1 / 10
The DISTINCT keyword - as the name implies - returns only distinct or unique values from the specified column(s). View the inventory table below, and see what comes back when you type:

SELECT DISTINCT category FROM inventory;

Table inventory

item_idproduct_namecategorysizecolor
1T-ShirtClothingMRed
2T-ShirtClothingLBlue
3JeansClothingMBlue
4HatAccessoriesOne SizeBlack
5SneakersFootwear10White
6BootsFootwear11Black

No key for < or > on your keyboard? Use these:

Ctrl+Enter to submit

πŸ”₯ 0 streak
⭐ 0 XP this lesson
All Lessons

SELECT DISTINCT - Unique Values - Free SQL Practice Online

Practise SELECT DISTINCT - Unique Values 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.