The docs on CREATE INDEX indicate that there are 2 kinds of UNIQUE index - UNIQUE by itself treats the null value like any other - so there can be only 1 row with a null value for a given column in the index. UNIQUE WHERE NOT NULL lets there be any number of rows with the null value.

That was V5R2 documentation.


Alan Campin wrote:
We are defining all our new tables for the new system using DDL and using
nulls where appropriate. My question has to do with Nulls and Indexes.

Has anyone seen a discussion of how the iSeries handles null and indexes? I
ran the following query and checked the low level messages and it indicated
that it was using the foreign key index to return the results. Just wondered
if there was more information at their on how nulls are handled in an index.

Select Count(*)


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].