Tables [dbo].[DocumentAutoUploadRuleDetailBranch]
Properties
PropertyValue
Row Count (~)27
Created7:36:48 PM Thursday, August 29, 2024
Last Modified7:36:50 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_DocumentAutoUploadRuleDetailBranch: DocumentAutoUploadRuleDetailBranchIDDocumentAutoUploadRuleDetailBranchIDint4
No
1 - 1
Foreign Keys FK_DocumentAutoUploadRuleDetailBranch_DocumentAutoUploadRuleDetail: [dbo].[DocumentAutoUploadRuleDetail].DocumentAutoUploadRuleDetailFIDIndexes IX_DocumentAutoUploadRuleDetailBranch_RuleDetail: DocumentAutoUploadRuleDetailFID\BranchFIDDocumentAutoUploadRuleDetailFIDint4
No
Foreign Keys FK_DocumentAutoUploadRuleDetailBranch_Branch: [dbo].[Branch].BranchFIDIndexes IX_DocumentAutoUploadRuleDetailBranch_Branch: BranchFIDIndexes IX_DocumentAutoUploadRuleDetailBranch_RuleDetail: DocumentAutoUploadRuleDetailFID\BranchFIDBranchFIDint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_DocumentAutoUploadRuleDetailBranch: DocumentAutoUploadRuleDetailBranchIDPK_DocumentAutoUploadRuleDetailBranchDocumentAutoUploadRuleDetailBranchID
Yes
IX_DocumentAutoUploadRuleDetailBranch_RuleDetailDocumentAutoUploadRuleDetailFID, BranchFID
Yes
IX_DocumentAutoUploadRuleDetailBranch_BranchBranchFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_DocumentAutoUploadRuleDetailBranch_BranchCascadeBranchFID->[dbo].[Branch].[BranchPriKey]
FK_DocumentAutoUploadRuleDetailBranch_DocumentAutoUploadRuleDetailCascadeDocumentAutoUploadRuleDetailFID->[dbo].[DocumentAutoUploadRuleDetail].[DocumentAutoUploadRuleDetailID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[DocumentAutoUploadRuleDetailBranch]
(
[DocumentAutoUploadRuleDetailBranchID] [int] NOT NULL IDENTITY(1, 1),
[DocumentAutoUploadRuleDetailFID] [int] NOT NULL,
[BranchFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoUploadRuleDetailBranch] ADD CONSTRAINT [PK_DocumentAutoUploadRuleDetailBranch] PRIMARY KEY CLUSTERED  ([DocumentAutoUploadRuleDetailBranchID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DocumentAutoUploadRuleDetailBranch_Branch] ON [dbo].[DocumentAutoUploadRuleDetailBranch] ([BranchFID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DocumentAutoUploadRuleDetailBranch_RuleDetail] ON [dbo].[DocumentAutoUploadRuleDetailBranch] ([DocumentAutoUploadRuleDetailFID], [BranchFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoUploadRuleDetailBranch] ADD CONSTRAINT [FK_DocumentAutoUploadRuleDetailBranch_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[DocumentAutoUploadRuleDetailBranch] ADD CONSTRAINT [FK_DocumentAutoUploadRuleDetailBranch_DocumentAutoUploadRuleDetail] FOREIGN KEY ([DocumentAutoUploadRuleDetailFID]) REFERENCES [dbo].[DocumentAutoUploadRuleDetail] ([DocumentAutoUploadRuleDetailID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[DocumentAutoUploadRuleDetailBranch] TO [MssExec]
GRANT INSERT ON  [dbo].[DocumentAutoUploadRuleDetailBranch] TO [MssExec]
GRANT DELETE ON  [dbo].[DocumentAutoUploadRuleDetailBranch] TO [MssExec]
GRANT UPDATE ON  [dbo].[DocumentAutoUploadRuleDetailBranch] TO [MssExec]
GO
Uses