CREATE TABLE TCSpecItemCosts
(
	SpecID			int NOT NULL,
	ItemNum			int NOT NULL,
	CostSum			decimal(18,2),
	CostMaterial	decimal(18,2),
	CostMechanical	decimal(18,2),		
	PRIMARY KEY (SpecID, ItemNum)
)
GO
ALTER TABLE TCSpecItemCosts
	ADD FOREIGN KEY (SpecID, ItemNum)
	REFERENCES TCSpecItems(SpecID, ItemNum)
	ON DELETE CASCADE
        ON UPDATE CASCADE
