Tables [dbo].[QuoteTemplateDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created8:20:30 AM Friday, December 7, 2018
Last Modified8:20:48 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_QuoteTemplateDetail: QuoteTemplateDetailIDQuoteTemplateDetailIDint4
No
1 - 1
Foreign Keys FK_QuoteTemplateDetail_QuoteTemplate: [dbo].[QuoteTemplate].QuoteTemplateFIDIndexes IX_QuoteTemplateDetail_QuoteTemplateFID: QuoteTemplateFIDQuoteTemplateFIDint4
No
Foreign Keys FK_QuoteTemplateDetail_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Descriptionvarchar(128)128
No
Foreign Keys FK_QuoteTemplateDetail_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
SortOrderint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_QuoteTemplateDetail: QuoteTemplateDetailIDPK_QuoteTemplateDetailQuoteTemplateDetailID
Yes
IX_QuoteTemplateDetail_QuoteTemplateFIDQuoteTemplateFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_QuoteTemplateDetail_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_QuoteTemplateDetail_QuoteTemplateCascadeQuoteTemplateFID->[dbo].[QuoteTemplate].[QuoteTemplateID]
FK_QuoteTemplateDetail_RateTypeRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[QuoteTemplateDetail]
(
[QuoteTemplateDetailID] [int] NOT NULL IDENTITY(1, 1),
[QuoteTemplateFID] [int] NOT NULL,
[ItemCodeFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[RateTypeFID] [int] NULL,
[SortOrder] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteTemplateDetail] ADD CONSTRAINT [PK_QuoteTemplateDetail] PRIMARY KEY NONCLUSTERED  ([QuoteTemplateDetailID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_QuoteTemplateDetail_QuoteTemplateFID] ON [dbo].[QuoteTemplateDetail] ([QuoteTemplateFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteTemplateDetail] ADD CONSTRAINT [FK_QuoteTemplateDetail_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[QuoteTemplateDetail] ADD CONSTRAINT [FK_QuoteTemplateDetail_QuoteTemplate] FOREIGN KEY ([QuoteTemplateFID]) REFERENCES [dbo].[QuoteTemplate] ([QuoteTemplateID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[QuoteTemplateDetail] ADD CONSTRAINT [FK_QuoteTemplateDetail_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey])
GO
GRANT SELECT ON  [dbo].[QuoteTemplateDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[QuoteTemplateDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[QuoteTemplateDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[QuoteTemplateDetail] TO [MssExec]
GO
Uses