Tables [dbo].[CustomerStatementDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)161485
Created10:12:53 PM Thursday, December 28, 2006
Last Modified10:30:23 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_CustomerStatementDetail: CustomerStatementDetailIDCustomerStatementDetailIDint4
No
1 - 1
Cluster Key IX_CustomerStatementDetail_InvoiceGroupFID: CustomerStatementInvoiceGroupFIDForeign Keys FK_CustomerStatementDetail_CustomerStatementInvoiceGroup: [dbo].[CustomerStatementInvoiceGroup].CustomerStatementInvoiceGroupFIDCustomerStatementInvoiceGroupFIDint4
No
Foreign Keys FK_CustomerStatementDetail_CustomerStatementDocumentType: [dbo].[CustomerStatementDocumentType].CustomerStatementDocumentTypeFIDCustomerStatementDocumentTypeFIDint4
No
DocumentNumbervarchar(23)23
No
Descriptionvarchar(128)128
No
DocumentDatedatetime8
No
Amountmoney8
No
Statusvarchar(32)32
No
('')
Visiblebit1
No
((0))
IncludedOnInvoiceFlagbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_CustomerStatementDetail: CustomerStatementDetailIDPK_CustomerStatementDetailCustomerStatementDetailID
Yes
80
Cluster Key IX_CustomerStatementDetail_InvoiceGroupFID: CustomerStatementInvoiceGroupFIDIX_CustomerStatementDetail_InvoiceGroupFIDCustomerStatementInvoiceGroupFID80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_CustomerStatementDetail_CustomerStatementDocumentTypeCustomerStatementDocumentTypeFID->[dbo].[CustomerStatementDocumentType].[CustomerStatementDocumentTypeID]
FK_CustomerStatementDetail_CustomerStatementInvoiceGroupCascadeCustomerStatementInvoiceGroupFID->[dbo].[CustomerStatementInvoiceGroup].[CustomerStatementInvoiceGroupID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CustomerStatementDetail]
(
[CustomerStatementDetailID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementInvoiceGroupFID] [int] NOT NULL,
[CustomerStatementDocumentTypeFID] [int] NOT NULL,
[DocumentNumber] [varchar] (23) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DocumentDate] [datetime] NOT NULL,
[Amount] [money] NOT NULL,
[Status] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_CustomerStatementDetail_Status] DEFAULT (''),
[Visible] [bit] NOT NULL CONSTRAINT [DF_CustomerStatementDetail_Visible] DEFAULT ((0)),
[IncludedOnInvoiceFlag] [bit] NOT NULL CONSTRAINT [DF_CustomerStatementDetail_IncludedOnInvoiceFlag] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementDetail] ADD CONSTRAINT [PK_CustomerStatementDetail] PRIMARY KEY NONCLUSTERED  ([CustomerStatementDetailID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_CustomerStatementDetail_InvoiceGroupFID] ON [dbo].[CustomerStatementDetail] ([CustomerStatementInvoiceGroupFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementDetail] ADD CONSTRAINT [FK_CustomerStatementDetail_CustomerStatementDocumentType] FOREIGN KEY ([CustomerStatementDocumentTypeFID]) REFERENCES [dbo].[CustomerStatementDocumentType] ([CustomerStatementDocumentTypeID])
GO
ALTER TABLE [dbo].[CustomerStatementDetail] ADD CONSTRAINT [FK_CustomerStatementDetail_CustomerStatementInvoiceGroup] FOREIGN KEY ([CustomerStatementInvoiceGroupFID]) REFERENCES [dbo].[CustomerStatementInvoiceGroup] ([CustomerStatementInvoiceGroupID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[CustomerStatementDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerStatementDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerStatementDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerStatementDetail] TO [MssExec]
GO
Uses