Database Error Messages

Release
toggle
  • 23ai
Updated
Jun 24, 2024

OCI-03045

DISTINCT or UNIQUE keyword in select_list of SELECT statement

Cause

The DISTINCT or UNIQUE keyword is encountered in the select_list of a SELECT SQL statement. This is syntactically invalid.


Action

The DISTINCT or UNIQUE keyword can be used before the select_list to return only one copy of each set of duplicate rows selected. For example:

  • SELECT DISTINCT ENAME, JOB, SAL FROM EMP;
  • SELECT UNIQUE ENAME, JOB, SAL FROM EMP;