Constraint
Create Primary Key
Ingres allows to create a primary key for a
table. After selecting the table columns, DtSQL can generate and
execute the SQL to create the primary key.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD
PRIMARY KEY ( B, C )
Create Foreign Key
Ingres allows to create a foreign key for a
table to reference to another table. After selecting the table columns
and referenced table columns, DtSQL can generate and execute the
SQL to create the foreign key.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD
FOREIGN KEY ( A, C )
REFERENCES "TEST_SCHEMA"."TEST_TB" (B, A )
Create Check Constraint
Ingres allows to create a check constraint for
a table column. After entering the check constraint name and check
action, DtSQL can generate and execute the SQL to create the check
constraint.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD CONSTRAINT
"TEST_CHECK" CHECK ( C > 10 )
Create Unique Constraint
Ingres allows to create an unique constraint
for a table columns. After entering the unique constraint name and
selecting table columns, DtSQL can generate and execute the SQL
to create the unique constraint.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
ADD CONSTRAINT "TEST_UNIQUE"
UNIQUE ( B, C )
Drop Primary Key
Ingres allows to drop an existing primary key.
After selecting the primary key, DtSQL can generate and execute
the SQL to delete the primary key.
Sample :
ALTER TABLE "TEST_SCHEMA"."TEST_TABLE"
DROP CONSTRAINT "$test2_u0000018a00000000" RESTRICT
Drop Foreign Key
Ingres allows to drop an existing foreign key.
After selecting the foreign key, DtSQL can generate and execute
the SQL to delete the foreign key.
Sample :
ALTER TABLE "TEST_SCHEMA"."TEST_TABLE"
DROP CONSTRAINT "$test2_u0000018b00000000" RESTRICT
Drop Check Constraint
Ingres allows to drop an existing check constraint.
After selecting the check constraint, DtSQL can generate and execute
the SQL to delete the check constraint.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
DROP CONSTRAINT
"TEST_CHECK"
Drop Unique Constraint
Ingres allows to drop an existing unique constraint.
After selecting the unique constraint, DtSQL can generate and execute
the SQL to delete the unique constraint.
Sample :
ALTER TABLE
"TEST_SCHEMA"."TEST_TABLE"
DROP CONSTRAINT "TEST_UNIQUE"
|