Constraint
Create Primary Key
MySQL 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
MySQL 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 Unique Constraint
MySQL 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
MySQL 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
MySQL 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_IBFK_1
Drop Unique Constraint
MySQL 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 INDEX TEST_UNIQUE
|