Tables [dbo].[Agent]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)5946
Created4:57:07 PM Thursday, September 7, 2006
Last Modified9:11:36 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Indexes IX_Agent_AgentIDVLPriKey: AgentID\VLPriKeyAgentIDvarchar(10)10
No
Check Constraints CK_Agent_Name : ([Name]<>'')Namevarchar(30)30
No
Countyvarchar(3)3
Yes
Memovarchar(60)60
Yes
Cluster Primary Key PK_AGENT: AgentPriKeyAgentPriKeyint4
No
1 - 1
Foreign Keys FK_AGENT_VANLINE: [dbo].[VanLine].VLPriKeyIndexes IX_Agent_AgentIDVLPriKey: AgentID\VLPriKeyVLPriKeyint4
No
VendorIDvarchar(15)15
Yes
IsActivebit1
No
((1))
HaulOwnAuthoritybit1
No
((0))
HaulVanLineAuthoritybit1
No
((0))
IsForwardingAgentbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_AGENT: AgentPriKeyPK_AGENTAgentPriKey
Yes
80
IX_Agent_AgentIDVLPriKeyAgentID, VLPriKey
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_Agent_NameName([Name]<>'')
Foreign Keys Foreign Keys
NameColumns
FK_AGENT_VANLINEVLPriKey->[dbo].[VanLine].[VLPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[Agent]
(
[AgentID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[County] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Memo] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AgentPriKey] [int] NOT NULL IDENTITY(1, 1),
[VLPriKey] [int] NOT NULL,
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsActive] [bit] NOT NULL CONSTRAINT [DF_Agent_IsActive] DEFAULT ((1)),
[HaulOwnAuthority] [bit] NOT NULL CONSTRAINT [DF_Agent_HaulOwnAuthority] DEFAULT ((0)),
[HaulVanLineAuthority] [bit] NOT NULL CONSTRAINT [DF_Agent_HaulVanLineAuthority] DEFAULT ((0)),
[IsForwardingAgent] [bit] NOT NULL CONSTRAINT [DF_Agent_IsForwardingAgent] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Agent] ADD CONSTRAINT [CK_Agent_Name] CHECK (([Name]<>''))
GO
ALTER TABLE [dbo].[Agent] ADD CONSTRAINT [PK_AGENT] PRIMARY KEY CLUSTERED  ([AgentPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Agent] ADD CONSTRAINT [IX_Agent_AgentIDVLPriKey] UNIQUE NONCLUSTERED  ([AgentID], [VLPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Agent] ADD CONSTRAINT [FK_AGENT_VANLINE] FOREIGN KEY ([VLPriKey]) REFERENCES [dbo].[VanLine] ([VLPriKey])
GO
GRANT SELECT ON  [dbo].[Agent] TO [MssExec]
GRANT INSERT ON  [dbo].[Agent] TO [MssExec]
GRANT DELETE ON  [dbo].[Agent] TO [MssExec]
GRANT UPDATE ON  [dbo].[Agent] TO [MssExec]
GO
Uses
Used By