admin
Administrator
     
Offline
Posts: 236
|
 |
« on: January 26, 2022, 11:09: PM » |
|
if you have a field that show certain values multiple times yet you only want to know those values not all of the same values in the field then use the SELECT DISTINCT
lets say you have 10 records in a table have a column field - category and in that field 5 are RED and 5 are Blue values and you want a list of the type of values used then use the SELECT DISTINCT to show you just the different values - Red or Blue in the category field and not list all the values
SELECT DISTINCT category FROM models
is how you'd write the mysql
|