Add
Drop
ALTER TABLE [$DBName].[$Table]
ADD CONSTRAINT [$Constraint_Name]
FOREIGN KEY [$Constraint_Name] ([$ColumnName])
REFERENCES [$RefTable] ([$ColumnName])
{ON DELETE [NO ACTION/CASCADE/SET NULL/RESTRICT]}
{ON UPDATE [NO ACTION/CASCADE/SET NULL/RESTRICT]};
Drop
ALTER TABLE [$DBName].[$Table]
DROP FOREIGN KEY [$Constraint_Name] ;
留言