Tables [dbo].[AgentMarket]
Properties
PropertyValue
Row Count (~)0
Created8:59:41 AM Friday, December 7, 2018
Last Modified8:59:42 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_AgentMarket: AgentMarketIDAgentMarketIDint4
No
1 - 1
Foreign Keys FK_AgentMarket_Agent: [dbo].[Agent].AgentFIDIndexes IX_AgentMarket_AgentFID: AgentFIDIndexes IX_AgentMarket_Agent_Market: AgentFID\MarketFIDAgentFIDint4
No
Foreign Keys FK_AgentMarket_Market: [dbo].[Market].MarketFIDIndexes IX_AgentMarket_Agent_Market: AgentFID\MarketFIDMarketFIDint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_AgentMarket: AgentMarketIDPK_AgentMarketAgentMarketID
Yes
IX_AgentMarket_Agent_MarketAgentFID, MarketFID
Yes
IX_AgentMarket_AgentFIDAgentFID
Foreign Keys Foreign Keys
NameColumns
FK_AgentMarket_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_AgentMarket_MarketMarketFID->[dbo].[Market].[MarketID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AgentMarket]
(
[AgentMarketID] [int] NOT NULL IDENTITY(1, 1),
[AgentFID] [int] NOT NULL,
[MarketFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentMarket] ADD CONSTRAINT [PK_AgentMarket] PRIMARY KEY CLUSTERED  ([AgentMarketID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentMarket] ADD CONSTRAINT [IX_AgentMarket_Agent_Market] UNIQUE NONCLUSTERED  ([AgentFID], [MarketFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AgentMarket_AgentFID] ON [dbo].[AgentMarket] ([AgentFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentMarket] ADD CONSTRAINT [FK_AgentMarket_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[AgentMarket] ADD CONSTRAINT [FK_AgentMarket_Market] FOREIGN KEY ([MarketFID]) REFERENCES [dbo].[Market] ([MarketID])
GO
GRANT SELECT ON  [dbo].[AgentMarket] TO [MssExec]
GRANT INSERT ON  [dbo].[AgentMarket] TO [MssExec]
GRANT DELETE ON  [dbo].[AgentMarket] TO [MssExec]
GRANT UPDATE ON  [dbo].[AgentMarket] TO [MssExec]
GO
Uses