PostgreSQL Distinct Clause eliminates duplicate rows from the select query result set.
PostgreSQL Distinct Clause Syntax:
SELECT distinct column_name from table_name ;
PostgreSQL Distinct Examples:
1. Select list of jobs from emp table.
select distinct job from emp;
2. Select list of department numbers in emp table.
select distinct deptno from emp;
3. Select different jobs in each department of emp table.
select distinct deptno,job from emp;