Tables [dbo].[CustomerStatementOrderGroup]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)159132
Created10:12:52 PM Thursday, December 28, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_CustomerStatementOrderGroup: CustomerStatementOrderGroupIDCustomerStatementOrderGroupIDint4
No
1 - 1
Cluster Key IX_CustomerStatementOrderGroup_StatementFID: CustomerStatementFIDForeign Keys FK_CustomerStatementOrderGroup_CustomerStatement: [dbo].[CustomerStatement].CustomerStatementFIDCustomerStatementFIDint4
No
Foreign Keys FK_CustomerStatementOrderGroup_CustomerStatementDocumentType: [dbo].[CustomerStatementDocumentType].CustomerStatementDocumentTypeFIDCustomerStatementDocumentTypeFIDint4
No
Indexes IX_CustomerStatementOrderGroup_OrderNumber: OrderNumberOrderNumbervarchar(23)23
No
('')
Shippervarchar(64)64
No
('')
Descriptionvarchar(128)128
No
('')
BalanceForwardDatedatetime8
No
Amountmoney8
No
Balancemoney8
No
((0))
Statusvarchar(32)32
No
('')
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_CustomerStatementOrderGroup: CustomerStatementOrderGroupIDPK_CustomerStatementOrderGroupCustomerStatementOrderGroupID
Yes
80
IX_CustomerStatementOrderGroup_OrderNumberOrderNumber80
Cluster Key IX_CustomerStatementOrderGroup_StatementFID: CustomerStatementFIDIX_CustomerStatementOrderGroup_StatementFIDCustomerStatementFID80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_CustomerStatementOrderGroup_CustomerStatementDocumentTypeCustomerStatementDocumentTypeFID->[dbo].[CustomerStatementDocumentType].[CustomerStatementDocumentTypeID]
FK_CustomerStatementOrderGroup_CustomerStatementCascadeCustomerStatementFID->[dbo].[CustomerStatement].[CustomerStatementID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CustomerStatementOrderGroup]
(
[CustomerStatementOrderGroupID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementFID] [int] NOT NULL,
[CustomerStatementDocumentTypeFID] [int] NOT NULL,
[OrderNumber] [varchar] (23) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_CustomerStatementOrderGroup_OrderNumber] DEFAULT (''),
[Shipper] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_CustomerStatementOrderGroup_Shipper] DEFAULT (''),
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_CustomerStatementOrderGroup_Description] DEFAULT (''),
[BalanceForwardDate] [datetime] NOT NULL,
[Amount] [money] NOT NULL,
[Balance] [money] NOT NULL CONSTRAINT [DF_CustomerStatementOrderGroup_Balance] DEFAULT ((0)),
[Status] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_CustomerStatementOrderGroup_Status] DEFAULT ('')
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementOrderGroup] ADD CONSTRAINT [PK_CustomerStatementOrderGroup] PRIMARY KEY NONCLUSTERED  ([CustomerStatementOrderGroupID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_CustomerStatementOrderGroup_StatementFID] ON [dbo].[CustomerStatementOrderGroup] ([CustomerStatementFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CustomerStatementOrderGroup_OrderNumber] ON [dbo].[CustomerStatementOrderGroup] ([OrderNumber]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementOrderGroup] ADD CONSTRAINT [FK_CustomerStatementOrderGroup_CustomerStatementDocumentType] FOREIGN KEY ([CustomerStatementDocumentTypeFID]) REFERENCES [dbo].[CustomerStatementDocumentType] ([CustomerStatementDocumentTypeID])
GO
ALTER TABLE [dbo].[CustomerStatementOrderGroup] ADD CONSTRAINT [FK_CustomerStatementOrderGroup_CustomerStatement] FOREIGN KEY ([CustomerStatementFID]) REFERENCES [dbo].[CustomerStatement] ([CustomerStatementID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[CustomerStatementOrderGroup] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerStatementOrderGroup] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerStatementOrderGroup] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerStatementOrderGroup] TO [MssExec]
GO
Uses
Used By