Adds a unique constraint to an existing column or set of columns.

Available attributes

Name Description Required for Supports

Name of the catalog

clustered Whether create a clustered index mssql
columnNames Name of the column(s) to create the unique constraint on. Comma separated if multiple all all
constraintName Name of the unique constraint all
deferrable True if this constraint is deferrable, False otherwise all
disabled True if this constraint is disabled, False otherwise all
forIndexCatalogName all
forIndexName oracle
forIndexSchemaName all
initiallyDeferred True if this constraint is initially deferred, False otherwise all

Name of the schema

tableName Name of the table to create the unique constraint on all all
tablespace 'Tablespace' to create the index in. Corresponds to file group in mssql all
validate Should be true if the unique constraint shall 'ENABLE VALIDATE' set, or false if the 'ENABLE NOVALIDATE' shall. all

Database support

Database Notes Auto Rollback
DB2/LUW Supported Yes
DB2/z Supported Yes
Derby Supported Yes
Firebird Supported Yes
H2 Supported Yes
HyperSQL Supported Yes
INGRES Supported Yes
Informix Supported Yes
MariaDB Supported Yes
MySQL Supported Yes
Oracle Supported Yes
PostgreSQL Supported Yes
Snowflake Supported Yes
SQL Server Supported Yes
SQLite Not Supported No
Sybase Supported Yes
Sybase Anywhere Supported Yes