The Oracle DISTINCT clause is used to eliminate duplicate records from the table and retrieve only unique records. The Oracle DISTINCT clause is used with the SELECT statement only.
To retrieve only unique records from existing table, use the following syntax:
Parameters:
tablename: The table name from which you want to remove all records.
DISTINCT: To eliminate duplicate records.
Note:
If DISTINCT clause is used with single field, the query will return the unique values for that field only.
If DISTINCT clause is used with multiple fields, the query will retrieve unique combinations for the expressions listed.
Note:
In the above example, we have fetched unique "address" from "tblCustomerLoan"