Tables [dbo].[MilitaryCarrierPayeeCode]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created11:16:06 AM Wednesday, January 9, 2013
Last Modified11:13:40 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_MilitaryCarrierPayeeCode: MilitaryCarrierPayeeCodeIDMilitaryCarrierPayeeCodeIDint4
No
1 - 1
Foreign Keys FK_MilitaryCarrierPayeeCode_MilitaryCarrier: [dbo].[MilitaryCarrier].MilitaryCarrierFIDIndexes IX_MilitaryCarrierPayeeCode_MilitaryCarrierFID: MilitaryCarrierFIDIndexes IX_MilitaryCarrier_PayeeCode: MilitaryCarrierFID\PayeeCodeMilitaryCarrierFIDint4
No
Descriptionvarchar(64)64
No
Indexes IX_MilitaryCarrier_PayeeCode: MilitaryCarrierFID\PayeeCodePayeeCodevarchar(32)32
No
IsDefaultbit1
No
((0))
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MilitaryCarrierPayeeCode: MilitaryCarrierPayeeCodeIDPK_MilitaryCarrierPayeeCodeMilitaryCarrierPayeeCodeID
Yes
IX_MilitaryCarrier_PayeeCodeMilitaryCarrierFID, PayeeCode
Yes
IX_MilitaryCarrierPayeeCode_MilitaryCarrierFIDMilitaryCarrierFID
Check Constraints Check Constraints
NameConstraint
CK_MilitaryCarrierPayeeCode_IsDefault((0)=[dbo].[MilitaryCarrierPayeeCodeDefault]([MilitaryCarrierPayeeCodeID],[MilitaryCarrierFID],[IsDefault]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryCarrierPayeeCode_MilitaryCarrierCascadeMilitaryCarrierFID->[dbo].[MilitaryCarrier].[MilitaryCarrierID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryCarrierPayeeCode]
(
[MilitaryCarrierPayeeCodeID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryCarrierFID] [int] NOT NULL,
[Description] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PayeeCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IsDefault] [bit] NOT NULL CONSTRAINT [DF_MilitaryCarrierPayeeCode_IsDefault] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPayeeCode] ADD CONSTRAINT [CK_MilitaryCarrierPayeeCode_IsDefault] CHECK (((0)=[dbo].[MilitaryCarrierPayeeCodeDefault]([MilitaryCarrierPayeeCodeID],[MilitaryCarrierFID],[IsDefault])))
GO
ALTER TABLE [dbo].[MilitaryCarrierPayeeCode] ADD CONSTRAINT [PK_MilitaryCarrierPayeeCode] PRIMARY KEY CLUSTERED  ([MilitaryCarrierPayeeCodeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPayeeCode] ADD CONSTRAINT [IX_MilitaryCarrier_PayeeCode] UNIQUE NONCLUSTERED  ([MilitaryCarrierFID], [PayeeCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MilitaryCarrierPayeeCode_MilitaryCarrierFID] ON [dbo].[MilitaryCarrierPayeeCode] ([MilitaryCarrierFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierPayeeCode] ADD CONSTRAINT [FK_MilitaryCarrierPayeeCode_MilitaryCarrier] FOREIGN KEY ([MilitaryCarrierFID]) REFERENCES [dbo].[MilitaryCarrier] ([MilitaryCarrierID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MilitaryCarrierPayeeCode] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryCarrierPayeeCode] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryCarrierPayeeCode] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryCarrierPayeeCode] TO [MssExec]
GO
Uses
Used By