Tables [dbo].[ItemCodeAgentPct]
Properties
PropertyValue
Row Count (~)4
Created3:35:23 PM Tuesday, May 8, 2012
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_ItemCodeAgentPct: ItemCodeAgentPctIDItemCodeAgentPctIDint4
No
1 - 1
Cluster Key IX_ItemCodeAgentPct: ItemCodeFID\AuthorityTypeFID\ShipmentTypeFIDForeign Keys FK_ItemCodeAgentPct_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
No
Cluster Key IX_ItemCodeAgentPct: ItemCodeFID\AuthorityTypeFID\ShipmentTypeFIDForeign Keys FK_ItemCodeAgentPct_AuthorityTypes: [dbo].[AuthorityTypes].AuthorityTypeFIDAuthorityTypeFIDint4
No
AgentPercentagefloat8
No
Cluster Key IX_ItemCodeAgentPct: ItemCodeFID\AuthorityTypeFID\ShipmentTypeFIDForeign Keys FK_ItemCodeAgentPct_ShipmentType: [dbo].[ShipmentType].ShipmentTypeFIDShipmentTypeFIDint4
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_ItemCodeAgentPct: ItemCodeAgentPctIDPK_ItemCodeAgentPctItemCodeAgentPctID
Yes
Cluster Key IX_ItemCodeAgentPct: ItemCodeFID\AuthorityTypeFID\ShipmentTypeFIDIX_ItemCodeAgentPctItemCodeFID, AuthorityTypeFID, ShipmentTypeFID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_ItemCodeAgentPct_AuthorityTypesAuthorityTypeFID->[dbo].[AuthorityTypes].[AuthPriKey]
FK_ItemCodeAgentPct_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_ItemCodeAgentPct_ShipmentTypeShipmentTypeFID->[dbo].[ShipmentType].[ShipmentTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ItemCodeAgentPct]
(
[ItemCodeAgentPctID] [int] NOT NULL IDENTITY(1, 1),
[ItemCodeFID] [int] NOT NULL,
[AuthorityTypeFID] [int] NOT NULL,
[AgentPercentage] [float] NOT NULL,
[ShipmentTypeFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCodeAgentPct] ADD CONSTRAINT [PK_ItemCodeAgentPct] PRIMARY KEY NONCLUSTERED  ([ItemCodeAgentPctID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCodeAgentPct] ADD CONSTRAINT [IX_ItemCodeAgentPct] UNIQUE CLUSTERED  ([ItemCodeFID], [AuthorityTypeFID], [ShipmentTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemCodeAgentPct] ADD CONSTRAINT [FK_ItemCodeAgentPct_AuthorityTypes] FOREIGN KEY ([AuthorityTypeFID]) REFERENCES [dbo].[AuthorityTypes] ([AuthPriKey])
GO
ALTER TABLE [dbo].[ItemCodeAgentPct] ADD CONSTRAINT [FK_ItemCodeAgentPct_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[ItemCodeAgentPct] ADD CONSTRAINT [FK_ItemCodeAgentPct_ShipmentType] FOREIGN KEY ([ShipmentTypeFID]) REFERENCES [dbo].[ShipmentType] ([ShipmentTypeID])
GO
GRANT SELECT ON  [dbo].[ItemCodeAgentPct] TO [MssExec]
GRANT INSERT ON  [dbo].[ItemCodeAgentPct] TO [MssExec]
GRANT DELETE ON  [dbo].[ItemCodeAgentPct] TO [MssExec]
GRANT UPDATE ON  [dbo].[ItemCodeAgentPct] TO [MssExec]
GO
Uses