Tables [dbo].[CustomerStatement]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)42100
Created10:12:48 PM Thursday, December 28, 2006
Last Modified7:31:38 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_CustomerStatement: CustomerStatementIDCustomerStatementIDint4
No
1 - 1
Cluster Key IX_CustomerStatement_StatementRunFID: CustomerStatementRunFIDForeign Keys FK_CustomerStatement_CustomerStatementRun: [dbo].[CustomerStatementRun].CustomerStatementRunFIDCustomerStatementRunFIDint4
No
CustomerNamevarchar(65)65
No
CustomerNumbervarchar(15)15
No
CustomerAddress1varchar(61)61
No
CustomerAddress2varchar(61)61
No
CustomerAddress3varchar(61)61
No
CustomerCityvarchar(35)35
No
CustomerStatevarchar(29)29
No
CustomerPostalCodevarchar(11)11
No
PaymentTermsvarchar(21)21
No
CurrentAmountmoney8
No
From30To60Amountmoney8
No
From61To90Amountmoney8
No
From91To120Amountmoney8
No
GreaterThan120Amountmoney8
No
CustomerClassvarchar(15)15
No
StatementCyclevarchar(32)32
No
Balancemoney8
No
((0))
StatementNamevarchar(65)65
Yes
CustomerCountryvarchar(61)61
Yes
EmailAddressvarchar(201)201
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_CustomerStatement: CustomerStatementIDPK_CustomerStatementCustomerStatementID
Yes
80
Cluster Key IX_CustomerStatement_StatementRunFID: CustomerStatementRunFIDIX_CustomerStatement_StatementRunFIDCustomerStatementRunFID80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_CustomerStatement_CustomerStatementRunCascadeCustomerStatementRunFID->[dbo].[CustomerStatementRun].[CustomerStatementRunID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CustomerStatement]
(
[CustomerStatementID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementRunFID] [int] NOT NULL,
[CustomerName] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerAddress1] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerAddress2] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerAddress3] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerCity] [varchar] (35) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerState] [varchar] (29) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CustomerPostalCode] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PaymentTerms] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CurrentAmount] [money] NOT NULL,
[From30To60Amount] [money] NOT NULL,
[From61To90Amount] [money] NOT NULL,
[From91To120Amount] [money] NOT NULL,
[GreaterThan120Amount] [money] NOT NULL,
[CustomerClass] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[StatementCycle] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Balance] [money] NOT NULL CONSTRAINT [DF_CustomerStatement_Balance] DEFAULT ((0)),
[StatementName] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustomerCountry] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EmailAddress] [varchar] (201) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatement] ADD CONSTRAINT [PK_CustomerStatement] PRIMARY KEY NONCLUSTERED  ([CustomerStatementID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_CustomerStatement_StatementRunFID] ON [dbo].[CustomerStatement] ([CustomerStatementRunFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatement] ADD CONSTRAINT [FK_CustomerStatement_CustomerStatementRun] FOREIGN KEY ([CustomerStatementRunFID]) REFERENCES [dbo].[CustomerStatementRun] ([CustomerStatementRunID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[CustomerStatement] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerStatement] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerStatement] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerStatement] TO [MssExec]
GO
Uses
Used By