-- Table: template CREATE TABLE [template] ( [gobject_id] int NOT NULL, [toolset_id] int NOT NULL, CONSTRAINT [PK_template] PRIMARY KEY ([gobject_id], [gobject_id], [toolset_id]) ); GO ALTER TABLE [template] ADD FOREIGN KEY ([toolset_id]) REFERENCES [toolset] ([toolset_id]); GO