Tables [dbo].[VendorConnectBranch]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created7:34:52 PM Wednesday, February 28, 2024
Last Modified7:38:09 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_VendorConnectBranch: VendorConnectBranchIDIndexes IX_VendorConnectBranch_AgentConnectCode: AgentConnectCode\VendorConnectBranchIDVendorConnectBranchIDint4
No
1 - 1
Foreign Keys FK_VendorConnectBranch_VendorConnect: [dbo].[VendorConnect].VendorConnectFIDIndexes IX_VendorConnectBranch_VendorConnect_Branch: VendorConnectFID\BranchFIDIndexes IX_VendorConnectBranch_VendorConnect_ExternalCode: VendorConnectFID\ExternalCodeVendorConnectFIDint4
No
Foreign Keys FK_VendorConnectBranch_Branch: [dbo].[Branch].BranchFIDIndexes IX_VendorConnectBranch_VendorConnect_Branch: VendorConnectFID\BranchFIDBranchFIDint4
No
Indexes IX_VendorConnectBranch_VendorConnect_ExternalCode: VendorConnectFID\ExternalCodeExternalCodenvarchar(64)128
No
Inactivebit1
No
((0))
Indexes IX_VendorConnectBranch_AgentConnectCode: AgentConnectCode\VendorConnectBranchIDAgentConnectCodenvarchar(32)64
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_VendorConnectBranch: VendorConnectBranchIDPK_VendorConnectBranchVendorConnectBranchID
Yes
IX_VendorConnectBranch_AgentConnectCodeAgentConnectCode, VendorConnectBranchID
Yes
IX_VendorConnectBranch_VendorConnect_BranchVendorConnectFID, BranchFID
Yes
IX_VendorConnectBranch_VendorConnect_ExternalCodeVendorConnectFID, ExternalCode
Yes
Foreign Keys Foreign Keys
NameColumns
FK_VendorConnectBranch_BranchBranchFID->[dbo].[Branch].[BranchPriKey]
FK_VendorConnectBranch_VendorConnectVendorConnectFID->[dbo].[VendorConnect].[VendorConnectID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[VendorConnectBranch]
(
[VendorConnectBranchID] [int] NOT NULL IDENTITY(1, 1),
[VendorConnectFID] [int] NOT NULL,
[BranchFID] [int] NOT NULL,
[ExternalCode] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_VendorConnectBranch_Inactive] DEFAULT ((0)),
[AgentConnectCode] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [PK_VendorConnectBranch] PRIMARY KEY CLUSTERED  ([VendorConnectBranchID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [IX_VendorConnectBranch_AgentConnectCode] UNIQUE NONCLUSTERED  ([AgentConnectCode], [VendorConnectBranchID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [IX_VendorConnectBranch_VendorConnect_Branch] UNIQUE NONCLUSTERED  ([VendorConnectFID], [BranchFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [IX_VendorConnectBranch_VendorConnect_ExternalCode] UNIQUE NONCLUSTERED  ([VendorConnectFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [FK_VendorConnectBranch_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[VendorConnectBranch] ADD CONSTRAINT [FK_VendorConnectBranch_VendorConnect] FOREIGN KEY ([VendorConnectFID]) REFERENCES [dbo].[VendorConnect] ([VendorConnectID])
GO
GRANT SELECT ON  [dbo].[VendorConnectBranch] TO [MssExec]
GRANT INSERT ON  [dbo].[VendorConnectBranch] TO [MssExec]
GRANT DELETE ON  [dbo].[VendorConnectBranch] TO [MssExec]
GRANT UPDATE ON  [dbo].[VendorConnectBranch] TO [MssExec]
GO
Uses
Used By