Removing Duplicate Rows from the Result Set (Distinct)

SELECT DISTINCT column1 FROM table_name;

SELECT DISTINCT column1, column2 FROM table_name;

SELECT DISTINCT last_update FROM country ;

SELECT DISTINCT last_update, country FROM country order by country desc ;

The DISTINCT statement is used in a SELECT clause to remove duplicate rows from a result set. The DISTINCT statement keeps one row for each duplicate group.

It can be applied to one or more columns in the SELECT clause’s selection list.

If you specify multiple columns, the DISTINCT statement evaluates the copy based on the combination of the values of those columns.