Tables [dbo].[StorePhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created4:57:08 PM Thursday, September 7, 2006
Last Modified11:13:43 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_StorePhoneNumber: StorePhoneNumberIDStorePhoneNumberIDint4
No
1 - 1
Foreign Keys FK_StorePhoneNumber_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
AreaCode[dbo].[PhoneAreaCode]4
Yes
LocalNumber[dbo].[PhoneLocalNumber]20
Yes
Extension[dbo].[PhoneExtension]10
Yes
Foreign Keys FK_StorePhoneNumber_Stores: [dbo].[Stores].StoreFIDStoreFIDint4
No
Foreign Keys FK_StorePhoneNumber_StorePhoneType: [dbo].[StorePhoneType].StorePhoneTypeFIDStorePhoneTypeFIDint4
No
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_StorePhoneNumber: StorePhoneNumberIDPK_StorePhoneNumberStorePhoneNumberID
Yes
80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_StorePhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_StorePhoneNumber_StoresCascadeStoreFID->[dbo].[Stores].[StoreID]
FK_StorePhoneNumber_StorePhoneTypeStorePhoneTypeFID->[dbo].[StorePhoneType].[StorePhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StorePhoneNumber]
(
[StorePhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL,
[StoreFID] [int] NOT NULL,
[StorePhoneTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorePhoneNumber] ADD CONSTRAINT [PK_StorePhoneNumber] PRIMARY KEY CLUSTERED  ([StorePhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorePhoneNumber] ADD CONSTRAINT [FK_StorePhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[StorePhoneNumber] ADD CONSTRAINT [FK_StorePhoneNumber_Stores] FOREIGN KEY ([StoreFID]) REFERENCES [dbo].[Stores] ([StoreID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[StorePhoneNumber] ADD CONSTRAINT [FK_StorePhoneNumber_StorePhoneType] FOREIGN KEY ([StorePhoneTypeFID]) REFERENCES [dbo].[StorePhoneType] ([StorePhoneTypeID])
GO
GRANT SELECT ON  [dbo].[StorePhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[StorePhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[StorePhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[StorePhoneNumber] TO [MssExec]
GO
Uses
Used By