CREATE TABLE cf_MarkNumSequence ( partId INT NOT NULL, serialNumber VARCHAR(50), meltLotNumber VARCHAR(20), lastMarkNum INT DEFAULT ((0)) PRIMARY KEY ([partId], [serialNumber], [meltLotNumber]), FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE ON UPDATE CASCADE ); ALTER TABLE cf_Stamp DROP COLUMN lastMarkNum;