Firebird Documentation IndexFirebird Null Guide → SELECT DISTINCT
Firebird Home Firebird Home Prev: CHECK constraintsFirebird Documentation IndexUp: Firebird Null GuideNext: User-Defined Functions (UDFs)

SELECT DISTINCT

A SELECT DISTINCT statement considers all NULLs to be equal (NOT DISTINCT FROM each other), so if the select is on a single column it will return at most one NULL.

As mentioned earlier, Firebird 2.0 has a bug that causes the NULLS FIRST|LAST directive to fail under certain circumstances with SELECT DISTINCT. For more details, see the bugs list.

Prev: CHECK constraintsFirebird Documentation IndexUp: Firebird Null GuideNext: User-Defined Functions (UDFs)
Firebird Documentation IndexFirebird Null Guide → SELECT DISTINCT