Tables [dbo].[BranchAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)115
Created4:57:07 PM Thursday, September 7, 2006
Last Modified9:11:14 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_BranchAddress: BranchAddressIDBranchAddressIDint4
No
1 - 1
Foreign Keys FK_BranchAddress_Branch: [dbo].[Branch].BranchFIDIndexes IX_Unique_BranchFID_BranchAddressTypeFID: BranchFID\BranchAddressTypeFIDBranchFIDint4
No
Foreign Keys FK_BranchAddress_BranchAddressType: [dbo].[BranchAddressType].BranchAddressTypeFIDIndexes IX_Unique_BranchFID_BranchAddressTypeFID: BranchFID\BranchAddressTypeFIDBranchAddressTypeFIDint4
No
Titlevarchar(255)255
Yes
Contactvarchar(30)30
Yes
Addressvarchar(256)256
Yes
Cityvarchar(26)26
Yes
Statevarchar(2)2
Yes
Zipvarchar(10)10
Yes
Countyvarchar(3)3
Yes
Emailvarchar(120)120
Yes
Phone[dbo].[PhoneCombined]30
Yes
PhoneExtvarchar(6)6
Yes
Fax[dbo].[PhoneCombined]30
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_BranchAddress: BranchAddressIDPK_BranchAddressBranchAddressID
Yes
80
IX_Unique_BranchFID_BranchAddressTypeFIDBranchFID, BranchAddressTypeFID
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_BranchAddress_BranchAddressTypeBranchAddressTypeFID->[dbo].[BranchAddressType].[BranchAddressTypeID]
FK_BranchAddress_BranchBranchFID->[dbo].[Branch].[BranchPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BranchAddress]
(
[BranchAddressID] [int] NOT NULL IDENTITY(1, 1),
[BranchFID] [int] NOT NULL,
[BranchAddressTypeFID] [int] NOT NULL,
[Title] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Address] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[City] [varchar] (26) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[State] [varchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Zip] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[County] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Phone] [dbo].[PhoneCombined] NULL,
[PhoneExt] [varchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Fax] [dbo].[PhoneCombined] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchAddress] ADD CONSTRAINT [PK_BranchAddress] PRIMARY KEY CLUSTERED  ([BranchAddressID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchAddress] ADD CONSTRAINT [IX_Unique_BranchFID_BranchAddressTypeFID] UNIQUE NONCLUSTERED  ([BranchFID], [BranchAddressTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchAddress] ADD CONSTRAINT [FK_BranchAddress_BranchAddressType] FOREIGN KEY ([BranchAddressTypeFID]) REFERENCES [dbo].[BranchAddressType] ([BranchAddressTypeID])
GO
ALTER TABLE [dbo].[BranchAddress] ADD CONSTRAINT [FK_BranchAddress_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
GRANT SELECT ON  [dbo].[BranchAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[BranchAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[BranchAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[BranchAddress] TO [MssExec]
GO
Uses
Used By