createUniqueIndex function

Creates a new unique index.

Syntax
IndexSchema TableSchema.createUniqueIndex(
  String index_name
) throws ULjException
Parameters
  • index_name   The name of index. The specified name must be a valid SQL identifier.

Remarks

Each index key must be unique or contain a null in at least one column.

Unlike the columns in unique key constraints, columns in a unique index are allowed to be null. A foreign key can reference either a primary key or a unique key but a foreign key can not reference a unique index.

Returns

The IndexSchema assigned to the created unique index with the specified name.