Navigation:  NexusDB Guide > SQL Reference > Predicates >

Unique Predicate

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

Unique Predicate

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > Predicates

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"

 

© Nexus Database Systems Pty Ltd.

nexus_logo