Using DISTINCT in the query, such as SELECT DISTINCT column_name FROM table_name; You can also ask for a number of distinct values by SELECT COUNT (DISTINCT column_name) FROM table_name;
MySQL Interview Questions and Answers
Using DISTINCT in the query, such as SELECT DISTINCT column_name FROM table_name; You can also ask for a number of distinct values by SELECT COUNT (DISTINCT column_name) FROM table_name;