[dbo].[StorageProcessBilling]
CREATE TABLE [dbo].[StorageProcessBilling]
(
[PriKey] [int] NOT NULL IDENTITY(1, 1),
[StorageTypePriKey] [int] NOT NULL,
[SessionID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[BillingStatus] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[BranchPriKey] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageProcessBilling] ADD CONSTRAINT [PK_StorageProcessBilling] PRIMARY KEY NONCLUSTERED ([PriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageProcessBilling_SessionID] ON [dbo].[StorageProcessBilling] ([SessionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageProcessBilling] ADD CONSTRAINT [FK_StorageProcessBilling_Branch] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StorageProcessBilling] ADD CONSTRAINT [FK_StorageProcessBilling_StorageType] FOREIGN KEY ([StorageTypePriKey]) REFERENCES [dbo].[StorageType] ([StorageTypePriKey])
GO
GRANT SELECT ON [dbo].[StorageProcessBilling] TO [MssExec]
GRANT INSERT ON [dbo].[StorageProcessBilling] TO [MssExec]
GRANT DELETE ON [dbo].[StorageProcessBilling] TO [MssExec]
GRANT UPDATE ON [dbo].[StorageProcessBilling] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The level (stored procedure) an error occurred during billing. ', 'SCHEMA', N'dbo', 'TABLE', N'StorageProcessBilling', 'COLUMN', N'BillingStatus'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a branch.', 'SCHEMA', N'dbo', 'TABLE', N'StorageProcessBilling', 'COLUMN', N'BranchPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'StorageProcessBilling', 'COLUMN', N'PriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Session id of the storage type and branch.', 'SCHEMA', N'dbo', 'TABLE', N'StorageProcessBilling', 'COLUMN', N'SessionID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a storage type.', 'SCHEMA', N'dbo', 'TABLE', N'StorageProcessBilling', 'COLUMN', N'StorageTypePriKey'
GO