Specify a test for the absence of duplicate rows.


Syntax

<unique predicate> ::= UNIQUE <table subquery>


Notes

The predicate evaluates to TRUE if the subquery result is empty or it contains no duplicate rows, else to FALSE.


Examples

1) The following example selects students enrolled in none or only 1 course:

       SELECT studentID, studentName

       FROM students s

       WHERE UNIQUE (

SELECT studentID

FROM enrolls

WHERE studentID = s.studentID

       )


Conformance

SQL:2003 standard

-

Feature F291 "UNIQUE predicate"

Home | Site Contents | Documentation | NexusDB Manual V4 | SQL Reference | Predicates