Constraint
Create Primary Key
Cache 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
Cache 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
Cache 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
Cache 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
Cache 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 PRIMARY KEY
|