Tables [dbo].[StorageTrackBilling]
Properties
PropertyValue
HeapYes
Row Count (~)30
Created4:57:10 PM Thursday, September 7, 2006
Last Modified11:13:43 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDescription
Primary Key PK_StorageTrackBilling: StorageTrackBillingPriKeyStorageTrackBillingPriKeyint4
No
1 - 1Primary key.
Foreign Keys FK_StorageTrackBilling_StorageType: [dbo].[StorageType].StorageTypePriKeyStorageTypePriKeyint4
No
Foreign key to a storage type.
Foreign Keys FK_StorageTrackBilling_Branch: [dbo].[Branch].BranchPriKeyBranchPriKeyint4
No
Foreign key to a branch.
LastBillFromdatetime8
No
Start date of the last billing period.
LastBillTodatetime8
No
End date of the last billing period.
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_StorageTrackBilling: StorageTrackBillingPriKeyPK_StorageTrackBillingStorageTrackBillingPriKey
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_StorageTrackBilling_BranchBranchPriKey->[dbo].[Branch].[BranchPriKey]
FK_StorageTrackBilling_StorageTypeStorageTypePriKey->[dbo].[StorageType].[StorageTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StorageTrackBilling]
(
[StorageTrackBillingPriKey] [int] NOT NULL IDENTITY(1, 1),
[StorageTypePriKey] [int] NOT NULL,
[BranchPriKey] [int] NOT NULL,
[LastBillFrom] [datetime] NOT NULL,
[LastBillTo] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageTrackBilling] ADD CONSTRAINT [PK_StorageTrackBilling] PRIMARY KEY NONCLUSTERED  ([StorageTrackBillingPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageTrackBilling] ADD CONSTRAINT [FK_StorageTrackBilling_Branch] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StorageTrackBilling] ADD CONSTRAINT [FK_StorageTrackBilling_StorageType] FOREIGN KEY ([StorageTypePriKey]) REFERENCES [dbo].[StorageType] ([StorageTypePriKey])
GO
GRANT SELECT ON  [dbo].[StorageTrackBilling] TO [MssExec]
GRANT INSERT ON  [dbo].[StorageTrackBilling] TO [MssExec]
GRANT DELETE ON  [dbo].[StorageTrackBilling] TO [MssExec]
GRANT UPDATE ON  [dbo].[StorageTrackBilling] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a branch.', 'SCHEMA', N'dbo', 'TABLE', N'StorageTrackBilling', 'COLUMN', N'BranchPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Start date of the last billing period.', 'SCHEMA', N'dbo', 'TABLE', N'StorageTrackBilling', 'COLUMN', N'LastBillFrom'
GO
EXEC sp_addextendedproperty N'MS_Description', N'End date of the last billing period.', 'SCHEMA', N'dbo', 'TABLE', N'StorageTrackBilling', 'COLUMN', N'LastBillTo'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'StorageTrackBilling', 'COLUMN', N'StorageTrackBillingPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a storage type.', 'SCHEMA', N'dbo', 'TABLE', N'StorageTrackBilling', 'COLUMN', N'StorageTypePriKey'
GO
Uses