I have table in MySql where I have column type
in this column type are different types
each row in table have type,
how to get list of those values ( not repeating = DISTINCT) ?
example:
id name type
-------------------
1 apple fruit
2 onion vegetable
3 banana fruit
List:
fruit
vegetable
Idea:
SELECT `type` FROM `food` WHERE ...
In order to get distinct Data You Use DISTINCT
SELECT DISTINCT TYPE FROM FOOD
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments