Tables [dbo].[ReductionTemplateIncludedReduction]
Properties
PropertyValue
Row Count (~)4
Created4:03:37 PM Thursday, May 10, 2012
Last Modified11:13:41 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_ReductionTemplateIncludedReduction: ReductionTemplateIncludedReductionIDReductionTemplateIncludedReductionIDint4
No
1 - 1
Cluster Key IX_ReductionTemplateIncludedReduction_ReductionTemplateDetailFID: ReductionTemplateDetailFID\OtherTemplateReductionFIDForeign Keys FK_ReductionTemplateIncludedReduction_ReductionTemplateDetail: [dbo].[ReductionTemplateDetail].ReductionTemplateDetailFIDReductionTemplateDetailFIDint4
No
Cluster Key IX_ReductionTemplateIncludedReduction_ReductionTemplateDetailFID: ReductionTemplateDetailFID\OtherTemplateReductionFIDForeign Keys FK_ReductionTemplateIncludedReduction_OtherTemplateReduction: [dbo].[ReductionTemplateHeader].OtherTemplateReductionFIDOtherTemplateReductionFIDint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_ReductionTemplateIncludedReduction: ReductionTemplateIncludedReductionIDPK_ReductionTemplateIncludedReductionReductionTemplateIncludedReductionID
Yes
Cluster Key IX_ReductionTemplateIncludedReduction_ReductionTemplateDetailFID: ReductionTemplateDetailFID\OtherTemplateReductionFIDIX_ReductionTemplateIncludedReduction_ReductionTemplateDetailFIDReductionTemplateDetailFID, OtherTemplateReductionFID
Yes
Check Constraints Check Constraints
NameConstraint
CK_ReductionTemplateIncludedReduction_CircularReductionCheck((1)=[dbo].[ReductionTemplateIncludedReductionValidMapping]([ReductionTemplateDetailFID],[OtherTemplateReductionFID]))
Foreign Keys Foreign Keys
NameColumns
FK_ReductionTemplateIncludedReduction_OtherTemplateReductionOtherTemplateReductionFID->[dbo].[ReductionTemplateHeader].[ReductionTemplateID]
FK_ReductionTemplateIncludedReduction_ReductionTemplateDetailReductionTemplateDetailFID->[dbo].[ReductionTemplateDetail].[ReductionTemplateDetailID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ReductionTemplateIncludedReduction]
(
[ReductionTemplateIncludedReductionID] [int] NOT NULL IDENTITY(1, 1),
[ReductionTemplateDetailFID] [int] NOT NULL,
[OtherTemplateReductionFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReductionTemplateIncludedReduction] ADD CONSTRAINT [CK_ReductionTemplateIncludedReduction_CircularReductionCheck] CHECK (((1)=[dbo].[ReductionTemplateIncludedReductionValidMapping]([ReductionTemplateDetailFID],[OtherTemplateReductionFID])))
GO
ALTER TABLE [dbo].[ReductionTemplateIncludedReduction] ADD CONSTRAINT [PK_ReductionTemplateIncludedReduction] PRIMARY KEY NONCLUSTERED  ([ReductionTemplateIncludedReductionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReductionTemplateIncludedReduction] ADD CONSTRAINT [IX_ReductionTemplateIncludedReduction_ReductionTemplateDetailFID] UNIQUE CLUSTERED  ([ReductionTemplateDetailFID], [OtherTemplateReductionFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReductionTemplateIncludedReduction] ADD CONSTRAINT [FK_ReductionTemplateIncludedReduction_OtherTemplateReduction] FOREIGN KEY ([OtherTemplateReductionFID]) REFERENCES [dbo].[ReductionTemplateHeader] ([ReductionTemplateID])
GO
ALTER TABLE [dbo].[ReductionTemplateIncludedReduction] ADD CONSTRAINT [FK_ReductionTemplateIncludedReduction_ReductionTemplateDetail] FOREIGN KEY ([ReductionTemplateDetailFID]) REFERENCES [dbo].[ReductionTemplateDetail] ([ReductionTemplateDetailID])
GO
GRANT SELECT ON  [dbo].[ReductionTemplateIncludedReduction] TO [MssExec]
GRANT INSERT ON  [dbo].[ReductionTemplateIncludedReduction] TO [MssExec]
GRANT DELETE ON  [dbo].[ReductionTemplateIncludedReduction] TO [MssExec]
GRANT UPDATE ON  [dbo].[ReductionTemplateIncludedReduction] TO [MssExec]
GO
Uses