The DISTINCT keyword is used to ensure that the fetched value always has unique values. It does not allow to have duplicate values. The DISTINCT keyword is used with the SELECT statement and retrieves different values from the table's column. We can use it with the help of the following syntax:
SELECT DISTINCT column_lists FROM table_name WHERE [condition];
Suppose we have a table 'customer' containing eight records in which the name column has some duplicate values.
Answers (0)