Class AlterTableUniqueIndexDelegate

  • All Implemented Interfaces:
    UniqueDelegate

    public class AlterTableUniqueIndexDelegate
    extends AlterTableUniqueDelegate
    A UniqueDelegate which uses create unique index commands when necessary.
    • DB2 does not allow unique constraints on nullable columns, but it does allow the creation of unique indexes instead, using create unique index ... exclude null keys or create unique where not null index, depending on flavor.
    • SQL Server does allow unique constraints on nullable columns, but the semantics are that two null values are non-unique. So here we need to jump through hoops with the create unique nonclustered index ... where ... command.