Tables [dbo].[MilitaryAllocationItemCodeException]
Properties
PropertyValue
Row Count (~)0
Created10:30:22 AM Monday, March 30, 2015
Last Modified10:30:29 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_MilitaryAllocationItemCodeException: MilitaryAllocationItemCodeExceptionIDMilitaryAllocationItemCodeExceptionIDint4
No
1 - 1
Foreign Keys FK_MilitaryAllocationItemCodeException_MilitaryAllocationItemCode: [dbo].[MilitaryAllocationItemCode].MilitaryAllocationItemCodeFIDIndexes IX_MilitaryAllocationItemCodeException_ExceptionType_PointOfService: MilitaryAllocationItemCodeFID\ExceptionTypeFID\PointOfServiceFIDMilitaryAllocationItemCodeFIDint4
No
Foreign Keys FK_MilitaryAllocationItemCodeException_ExceptionType: [dbo].[ExceptionType].ExceptionTypeFIDIndexes IX_MilitaryAllocationItemCodeException_ExceptionType_PointOfService: MilitaryAllocationItemCodeFID\ExceptionTypeFID\PointOfServiceFIDExceptionTypeFIDint4
No
Foreign Keys FK_MilitaryAllocationItemCodeException_PointOfService: [dbo].[PointOfService].PointOfServiceFIDIndexes IX_MilitaryAllocationItemCodeException_ExceptionType_PointOfService: MilitaryAllocationItemCodeFID\ExceptionTypeFID\PointOfServiceFIDPointOfServiceFIDint4
No
Foreign Keys FK_MilitaryAllocationItemCodeException_PreferredRevenueAgent: [dbo].[PreferredRevenueAgent].PayAgentFIDPayAgentFIDint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MilitaryAllocationItemCodeException: MilitaryAllocationItemCodeExceptionIDPK_MilitaryAllocationItemCodeExceptionMilitaryAllocationItemCodeExceptionID
Yes
IX_MilitaryAllocationItemCodeException_ExceptionType_PointOfServiceMilitaryAllocationItemCodeFID, ExceptionTypeFID, PointOfServiceFID
Yes
Check Constraints Check Constraints
NameConstraint
CK_MilitaryAllocationItemCodeException_ValidPayAgent((0)=[dbo].[CheckAllocationExceptionValidPayAgent]([MilitaryAllocationItemCodeFID],[PayAgentFID]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryAllocationItemCodeException_ExceptionTypeExceptionTypeFID->[dbo].[ExceptionType].[ExceptionTypeID]
FK_MilitaryAllocationItemCodeException_MilitaryAllocationItemCodeCascadeMilitaryAllocationItemCodeFID->[dbo].[MilitaryAllocationItemCode].[MilitaryAllocationItemCodeID]
FK_MilitaryAllocationItemCodeException_PreferredRevenueAgentPayAgentFID->[dbo].[PreferredRevenueAgent].[PreferredRevenueAgentID]
FK_MilitaryAllocationItemCodeException_PointOfServicePointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryAllocationItemCodeException]
(
[MilitaryAllocationItemCodeExceptionID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryAllocationItemCodeFID] [int] NOT NULL,
[ExceptionTypeFID] [int] NOT NULL,
[PointOfServiceFID] [int] NOT NULL,
[PayAgentFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [CK_MilitaryAllocationItemCodeException_ValidPayAgent] CHECK (((0)=[dbo].[CheckAllocationExceptionValidPayAgent]([MilitaryAllocationItemCodeFID],[PayAgentFID])))
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [PK_MilitaryAllocationItemCodeException] PRIMARY KEY CLUSTERED  ([MilitaryAllocationItemCodeExceptionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [IX_MilitaryAllocationItemCodeException_ExceptionType_PointOfService] UNIQUE NONCLUSTERED  ([MilitaryAllocationItemCodeFID], [ExceptionTypeFID], [PointOfServiceFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [FK_MilitaryAllocationItemCodeException_ExceptionType] FOREIGN KEY ([ExceptionTypeFID]) REFERENCES [dbo].[ExceptionType] ([ExceptionTypeID])
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [FK_MilitaryAllocationItemCodeException_MilitaryAllocationItemCode] FOREIGN KEY ([MilitaryAllocationItemCodeFID]) REFERENCES [dbo].[MilitaryAllocationItemCode] ([MilitaryAllocationItemCodeID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [FK_MilitaryAllocationItemCodeException_PreferredRevenueAgent] FOREIGN KEY ([PayAgentFID]) REFERENCES [dbo].[PreferredRevenueAgent] ([PreferredRevenueAgentID])
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCodeException] ADD CONSTRAINT [FK_MilitaryAllocationItemCodeException_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID])
GO
GRANT SELECT ON  [dbo].[MilitaryAllocationItemCodeException] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryAllocationItemCodeException] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryAllocationItemCodeException] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryAllocationItemCodeException] TO [MssExec]
GO
Uses