Constraint
Create Primary Key
Sybase Anywhere 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
Sybase Anywhere 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
Sybase Anywhere 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
Sybase Anywhere 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
Sybase Anywhere 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
Drop Foreign Key
Sybase Anywhere 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 FOREIGN KEY "TEST_TABLE"
Drop Check Constraint
Sybase Anywhere 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
Sybase Anywhere 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"
|