Tables [dbo].[BranchDivision]
Properties
PropertyValue
Row Count (~)0
Created10:12:55 PM Thursday, December 28, 2006
Last Modified11:13:38 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_BranchDivision: BranchDivisionIDBranchDivisionIDint4
No
1 - 1
Foreign Keys FK_BranchDivision_Branch: [dbo].[Branch].BranchFIDIndexes IX_Unique_BranchFID_DivisionFID: BranchFID\DivisionFIDBranchFIDint4
No
Foreign Keys FK_BranchDivision_Division: [dbo].[Division].DivisionFIDIndexes IX_Unique_BranchFID_DivisionFID: BranchFID\DivisionFIDDivisionFIDint4
No
BranchDefaultbit1
No
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_BranchDivision: BranchDivisionIDPK_BranchDivisionBranchDivisionID
Yes
80
IX_Unique_BranchFID_DivisionFIDBranchFID, DivisionFID
Yes
80
Check Constraints Check Constraints
NameConstraint
CK_BranchDivision_BranchDefault((1)<>[dbo].[BranchDefaultDivisionExists]([BranchFID],[DivisionFID],[BranchDefault]))
Foreign Keys Foreign Keys
NameColumns
FK_BranchDivision_BranchBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BranchDivision_DivisionDivisionFID->[dbo].[Division].[DivisionID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BranchDivision]
(
[BranchDivisionID] [int] NOT NULL IDENTITY(1, 1),
[BranchFID] [int] NOT NULL,
[DivisionFID] [int] NOT NULL,
[BranchDefault] [bit] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchDivision] ADD CONSTRAINT [CK_BranchDivision_BranchDefault] CHECK (((1)<>[dbo].[BranchDefaultDivisionExists]([BranchFID],[DivisionFID],[BranchDefault])))
GO
ALTER TABLE [dbo].[BranchDivision] ADD CONSTRAINT [PK_BranchDivision] PRIMARY KEY CLUSTERED  ([BranchDivisionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchDivision] ADD CONSTRAINT [IX_Unique_BranchFID_DivisionFID] UNIQUE NONCLUSTERED  ([BranchFID], [DivisionFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchDivision] ADD CONSTRAINT [FK_BranchDivision_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BranchDivision] ADD CONSTRAINT [FK_BranchDivision_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
GRANT SELECT ON  [dbo].[BranchDivision] TO [MssExec]
GRANT INSERT ON  [dbo].[BranchDivision] TO [MssExec]
GRANT DELETE ON  [dbo].[BranchDivision] TO [MssExec]
GRANT UPDATE ON  [dbo].[BranchDivision] TO [MssExec]
GO
Uses