SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-9
Creating and Dropping Constraints on SQL/MP
Tables
Constraint Names
When you create a constraint, you can either specify a name for it or allow a name to
be generated by NonStop SQL/MX. You can optionally specify both column and table
constraint names. Constraint names are three-part logical names. Constraints have
their own namespace within a schema, so a constraint name can have the same name
as a table, index, or view. However, no two constraints in a schema can have the same
name.
The name you specify can be fully qualified or not. If you specify the catalog or schema
parts of the name, they must match those parts of the affected table and must be
unique among constraint names in that schema. If you omit the catalog or schema
portion of the name you specify, NonStop SQL/MX expands the name by using the
catalog and schema for the table.
If you do not specify a constraint name, NonStop SQL/MX constructs an SQL identifier
as the name for the constraint and qualifies it with the catalog and schema of the
table.The identifier consists of the table name concatenated with a system-generated
unique identifier. Use the SHOWDDL statement to display this generated constraint
name.
Restrictions on Publish/Subscribe
Embedded update and embedded delete statements are not allowed on tables with
referential integrity constraints.
Creating and Dropping Constraints on SQL/MP Tables
To create check constraints on an SQL/MP table, use the SQL/MP CREATE
CONSTRAINT statement when you create the table. To drop constraints on an
SQL/MP table, use the SQL/MP DROP statement. A constraint name is an SQL
identifier.
For more information on SQL/MP commands, see the SQL/MP Reference Manual.