Tables [dbo].[MilitaryAllocationAgent]
Properties
PropertyValue
Row Count (~)0
Created10:30:29 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_MilitaryAllocationAgent: MilitaryAllocationAgentIDMilitaryAllocationAgentIDint4
No
1 - 1
Foreign Keys FK_MilitaryAllocationAgent_MilitaryAllocationHeader: [dbo].[MilitaryAllocationHeader].MilitaryAllocationHeaderFIDIndexes IX_MilitaryAllocationAgent_MilitaryAllocationHeader_Agent: MilitaryAllocationHeaderFID\AgentFIDMilitaryAllocationHeaderFIDint4
No
Foreign Keys FK_MilitaryAllocationAgent_Agent: [dbo].[Agent].AgentFIDIndexes IX_MilitaryAllocationAgent_MilitaryAllocationHeader_Agent: MilitaryAllocationHeaderFID\AgentFIDAgentFIDint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MilitaryAllocationAgent: MilitaryAllocationAgentIDPK_MilitaryAllocationAgentMilitaryAllocationAgentID
Yes
IX_MilitaryAllocationAgent_MilitaryAllocationHeader_AgentMilitaryAllocationHeaderFID, AgentFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryAllocationAgent_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_MilitaryAllocationAgent_MilitaryAllocationHeaderCascadeMilitaryAllocationHeaderFID->[dbo].[MilitaryAllocationHeader].[MilitaryAllocationHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryAllocationAgent]
(
[MilitaryAllocationAgentID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryAllocationHeaderFID] [int] NOT NULL,
[AgentFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationAgent] ADD CONSTRAINT [PK_MilitaryAllocationAgent] PRIMARY KEY CLUSTERED  ([MilitaryAllocationAgentID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationAgent] ADD CONSTRAINT [IX_MilitaryAllocationAgent_MilitaryAllocationHeader_Agent] UNIQUE NONCLUSTERED  ([MilitaryAllocationHeaderFID], [AgentFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationAgent] ADD CONSTRAINT [FK_MilitaryAllocationAgent_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[MilitaryAllocationAgent] ADD CONSTRAINT [FK_MilitaryAllocationAgent_MilitaryAllocationHeader] FOREIGN KEY ([MilitaryAllocationHeaderFID]) REFERENCES [dbo].[MilitaryAllocationHeader] ([MilitaryAllocationHeaderID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MilitaryAllocationAgent] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryAllocationAgent] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryAllocationAgent] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryAllocationAgent] TO [MssExec]
GO
Uses