The distinct keyword is used with the SELECT statement to return the values that are different or distinct. The distinct keyword also eliminates the duplicated record and extracts only the unique record.
Suppose in a table you have multiple duplicate records the distinct statement will only fetch out those records that are unique.
The distinct keyword can be used as in the following query:
SELECT DISTINCT column-name FROM table-name;
Suppose you have a table that is named STUDENT as follows:
SELECT DISTINCT MONFEE FROM student;
It can be seen that in the MONFEE column there are some values that are same, the distinct keyword will fetch out those values that are unique. Thus the above query will generate the following result: