Tables [dbo].[StorageInvoiceHistorical]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)714
Created4:57:09 PM Thursday, September 7, 2006
Last Modified9:37:42 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_StorageInvoiceHistorical: StorageInvoiceHistoricalIDStorageInvoiceHistoricalIDint4
No
1 - 1
Indexes IX_StorageInvoiceHistorical_SessionID: SessionIDSessionIDvarchar(50)50
No
Foreign Keys FK_StorageInvoiceHistorical_StorageType: [dbo].[StorageType].StorageTypeFIDStorageTypeFIDint4
Yes
Foreign Keys FK_StorageInvoiceHistorical_Branch: [dbo].[Branch].BranchFIDBranchFIDint4
Yes
BillStartDatedatetime8
No
BillEndDatedatetime8
No
GeneratedDatedatetime8
No
InvoiceCountint4
No
PaymentCountint4
No
((0))
OnlinePaymentCountint4
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_StorageInvoiceHistorical: StorageInvoiceHistoricalIDPK_StorageInvoiceHistoricalStorageInvoiceHistoricalID
Yes
80
IX_StorageInvoiceHistorical_SessionIDSessionID
Foreign Keys Foreign Keys
NameColumns
FK_StorageInvoiceHistorical_BranchBranchFID->[dbo].[Branch].[BranchPriKey]
FK_StorageInvoiceHistorical_StorageTypeStorageTypeFID->[dbo].[StorageType].[StorageTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StorageInvoiceHistorical]
(
[StorageInvoiceHistoricalID] [int] NOT NULL IDENTITY(1, 1),
[SessionID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[StorageTypeFID] [int] NULL,
[BranchFID] [int] NULL,
[BillStartDate] [datetime] NOT NULL,
[BillEndDate] [datetime] NOT NULL,
[GeneratedDate] [datetime] NOT NULL,
[InvoiceCount] [int] NOT NULL,
[PaymentCount] [int] NOT NULL CONSTRAINT [DF_StorageInvoiceHistorical_PaymentCount] DEFAULT ((0)),
[OnlinePaymentCount] [int] NOT NULL CONSTRAINT [DF_StorageInvoiceHistorical_OnlinePaymentCount] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageInvoiceHistorical] ADD CONSTRAINT [PK_StorageInvoiceHistorical] PRIMARY KEY NONCLUSTERED  ([StorageInvoiceHistoricalID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageInvoiceHistorical_SessionID] ON [dbo].[StorageInvoiceHistorical] ([SessionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageInvoiceHistorical] ADD CONSTRAINT [FK_StorageInvoiceHistorical_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StorageInvoiceHistorical] ADD CONSTRAINT [FK_StorageInvoiceHistorical_StorageType] FOREIGN KEY ([StorageTypeFID]) REFERENCES [dbo].[StorageType] ([StorageTypePriKey])
GO
GRANT SELECT ON  [dbo].[StorageInvoiceHistorical] TO [MssExec]
GRANT INSERT ON  [dbo].[StorageInvoiceHistorical] TO [MssExec]
GRANT DELETE ON  [dbo].[StorageInvoiceHistorical] TO [MssExec]
GRANT UPDATE ON  [dbo].[StorageInvoiceHistorical] TO [MssExec]
GO
Uses
Used By