Tables [dbo].[MilitaryAllocationDetail]
Properties
PropertyValue
Row Count (~)0
Created10:30:20 AM Monday, March 30, 2015
Last Modified10:34:27 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_MilitaryAllocationDetail: MilitaryAllocationDetailIDMilitaryAllocationDetailIDint4
No
1 - 1
Foreign Keys FK_MilitaryAllocationDetail_MilitaryAllocationHeader: [dbo].[MilitaryAllocationHeader].MilitaryAllocationHeaderFIDMilitaryAllocationHeaderFIDint4
No
Foreign Keys FK_MilitaryAllocationDetail_RevenueGroup: [dbo].[RevGroups].RevenueGroupFIDRevenueGroupFIDint4
No
EffectiveStartdatetime8
Yes
EffectiveEnddatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MilitaryAllocationDetail: MilitaryAllocationDetailIDPK_MilitaryAllocationDetailMilitaryAllocationDetailID
Yes
Check Constraints Check Constraints
NameConstraint
CK_MilitaryAllocationDetail_ValidEffectiveDates(isnull([EffectiveStart],(0))<isnull([EffectiveEnd],(100000)) AND (1)=[dbo].[MilitaryAllocationDetailEffectiveDates]([MilitaryAllocationHeaderFID],[RevenueGroupFID],[EffectiveStart],[EffectiveEnd]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryAllocationDetail_MilitaryAllocationHeaderCascadeMilitaryAllocationHeaderFID->[dbo].[MilitaryAllocationHeader].[MilitaryAllocationHeaderID]
FK_MilitaryAllocationDetail_RevenueGroupRevenueGroupFID->[dbo].[RevGroups].[RGPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryAllocationDetail]
(
[MilitaryAllocationDetailID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryAllocationHeaderFID] [int] NOT NULL,
[RevenueGroupFID] [int] NOT NULL,
[EffectiveStart] [datetime] NULL,
[EffectiveEnd] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationDetail] ADD CONSTRAINT [CK_MilitaryAllocationDetail_ValidEffectiveDates] CHECK ((isnull([EffectiveStart],(0))<isnull([EffectiveEnd],(100000)) AND (1)=[dbo].[MilitaryAllocationDetailEffectiveDates]([MilitaryAllocationHeaderFID],[RevenueGroupFID],[EffectiveStart],[EffectiveEnd])))
GO
ALTER TABLE [dbo].[MilitaryAllocationDetail] ADD CONSTRAINT [PK_MilitaryAllocationDetail] PRIMARY KEY CLUSTERED  ([MilitaryAllocationDetailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationDetail] ADD CONSTRAINT [FK_MilitaryAllocationDetail_MilitaryAllocationHeader] FOREIGN KEY ([MilitaryAllocationHeaderFID]) REFERENCES [dbo].[MilitaryAllocationHeader] ([MilitaryAllocationHeaderID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryAllocationDetail] ADD CONSTRAINT [FK_MilitaryAllocationDetail_RevenueGroup] FOREIGN KEY ([RevenueGroupFID]) REFERENCES [dbo].[RevGroups] ([RGPriKey])
GO
GRANT SELECT ON  [dbo].[MilitaryAllocationDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryAllocationDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryAllocationDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryAllocationDetail] TO [MssExec]
GO
Uses
Used By