In a table, a column may contain many duplicate values; and sometimes you only want to list the different (distinct) values.
The DISTINCT keyword can be used to return only distinct (different) values.
DISTINCT Syntax
SELECT DISTINCT column_name,column_name
FROM table_name;
FROM table_name;
DISTINCT Example
SELECT DISTINCT namr FROM tbl_student;
No comments:
Post a Comment