[dbo].[MilitaryCarrierPhoneNumber]
CREATE TABLE [dbo].[MilitaryCarrierPhoneNumber]
(
[MilitaryCarrierPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL,
[MilitaryCarrierFID] [int] NOT NULL,
[MilitaryCarrierPhoneTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPhoneNumber] ADD CONSTRAINT [PK_MilitaryCarrierPhoneNumber] PRIMARY KEY NONCLUSTERED ([MilitaryCarrierPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPhoneNumber] ADD CONSTRAINT [IX_MilitaryCarrierPhoneNumber_MilitaryCarrierAndPhoneType] UNIQUE NONCLUSTERED ([MilitaryCarrierFID], [MilitaryCarrierPhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[MilitaryCarrierPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierPhoneNumber_MilitaryCarrier] FOREIGN KEY ([MilitaryCarrierFID]) REFERENCES [dbo].[MilitaryCarrier] ([MilitaryCarrierID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryCarrierPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierPhoneNumber_MilitaryCarrierPhoneType] FOREIGN KEY ([MilitaryCarrierPhoneTypeFID]) REFERENCES [dbo].[MilitaryCarrierPhoneType] ([MilitaryCarrierPhoneTypeID])
GO
GRANT SELECT ON [dbo].[MilitaryCarrierPhoneNumber] TO [MssExec]
GRANT INSERT ON [dbo].[MilitaryCarrierPhoneNumber] TO [MssExec]
GRANT DELETE ON [dbo].[MilitaryCarrierPhoneNumber] TO [MssExec]
GRANT UPDATE ON [dbo].[MilitaryCarrierPhoneNumber] TO [MssExec]
GO