CREATE TABLE [dbo].[LSDiff]
(
[PriKey] [int] NOT NULL IDENTITY(1, 1),
[LSPriKey] [int] NOT NULL,
[DiffFactor] [int] NOT NULL,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LSDiff] ADD CONSTRAINT [PK_LSDiff] PRIMARY KEY CLUSTERED ([PriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LSDiff_LSPriKey] ON [dbo].[LSDiff] ([LSPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LSDiff] ADD CONSTRAINT [FK_LSDiff_LOCSERV] FOREIGN KEY ([LSPriKey]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[LSDiff] TO [MssExec]
GRANT INSERT ON [dbo].[LSDiff] TO [MssExec]
GRANT DELETE ON [dbo].[LSDiff] TO [MssExec]
GRANT UPDATE ON [dbo].[LSDiff] TO [MssExec]
GO