We can come across a situation in which we can find multiple duplicate data entries in a table which makes no sense to fetch all those entries to avoid redundancy while we are fetching records from that table. We need only those unique data entries that will make sense to fetch. For achieving this, DISTINCT keyword is provided by the SQL which we can use with the SELECT statement so that we can eliminate the duplicate data entries and can only fetch unique data entries. The syntax to use this keyword to eliminate duplicate data is as below: SELECT DISTINCT column1, column2, column3...columnM
FROM table_name1
WHERE [conditions] We can also this use UNIQUE keyword to handle duplicate data. The UNIQUE constraint is used for ensuring that all the values present in a specific column are different in SQL.