Tables [dbo].[AccountProfileOrderPrimaryContact]
This table stores information on which contact is considered a primary contact under a national account profile for an order record
Properties
PropertyValue
HeapYes
Row Count (~)0
Created4:57:05 PM Thursday, September 7, 2006
Last Modified11:13:37 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDescription
Primary Key PK_AccountProfileOrderPrimaryContact: AccountProfileOrderPrimaryContactIDAccountProfileOrderPrimaryContactIDint4
No
1 - 1Primary key of this table
Foreign Keys FK_AccountProfileOrderPrimaryContact_AccountProfileContacts: [dbo].[AccountProfileContacts].AccountProfileContactFIDAccountProfileContactFIDint4
No
Key linking this table to a national account contact
Foreign Keys FK_AccountProfileOrderPrimaryContact_Orders: [dbo].[Orders].OrderFIDIndexes ix_AccountProfileOrderPrimaryContact_Orders: OrderFIDOrderFIDint4
No
Key linking this table to an order record
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_AccountProfileOrderPrimaryContact: AccountProfileOrderPrimaryContactIDPK_AccountProfileOrderPrimaryContactAccountProfileOrderPrimaryContactID
Yes
80
ix_AccountProfileOrderPrimaryContact_OrdersOrderFID
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_AccountProfileOrderPrimaryContact_AccountProfileContactsAccountProfileContactFID->[dbo].[AccountProfileContacts].[AccountProfileContactID]
FK_AccountProfileOrderPrimaryContact_OrdersOrderFID->[dbo].[Orders].[PriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AccountProfileOrderPrimaryContact]
(
[AccountProfileOrderPrimaryContactID] [int] NOT NULL IDENTITY(1, 1),
[AccountProfileContactFID] [int] NOT NULL,
[OrderFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileOrderPrimaryContact] ADD CONSTRAINT [PK_AccountProfileOrderPrimaryContact] PRIMARY KEY NONCLUSTERED  ([AccountProfileOrderPrimaryContactID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileOrderPrimaryContact] ADD CONSTRAINT [ix_AccountProfileOrderPrimaryContact_Orders] UNIQUE NONCLUSTERED  ([OrderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileOrderPrimaryContact] ADD CONSTRAINT [FK_AccountProfileOrderPrimaryContact_AccountProfileContacts] FOREIGN KEY ([AccountProfileContactFID]) REFERENCES [dbo].[AccountProfileContacts] ([AccountProfileContactID])
GO
ALTER TABLE [dbo].[AccountProfileOrderPrimaryContact] ADD CONSTRAINT [FK_AccountProfileOrderPrimaryContact_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON  [dbo].[AccountProfileOrderPrimaryContact] TO [MssExec]
GRANT INSERT ON  [dbo].[AccountProfileOrderPrimaryContact] TO [MssExec]
GRANT DELETE ON  [dbo].[AccountProfileOrderPrimaryContact] TO [MssExec]
GRANT UPDATE ON  [dbo].[AccountProfileOrderPrimaryContact] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores information on which contact is considered a primary contact under a national account profile for an order record', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileOrderPrimaryContact', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a national account contact', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileOrderPrimaryContact', 'COLUMN', N'AccountProfileContactFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileOrderPrimaryContact', 'COLUMN', N'AccountProfileOrderPrimaryContactID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to an order record', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileOrderPrimaryContact', 'COLUMN', N'OrderFID'
GO
Uses