Tables [dbo].[StatementDetailDistInvoice]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created3:41:22 PM Tuesday, November 18, 2014
Last Modified10:30:22 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_StatementDetailDistInvoice: StatementDetailDistInvoiceIDStatementDetailDistInvoiceIDint4
No
1 - 1
Foreign Keys FK_StatementDetailDistInvoice_StatementDetailDistID: [dbo].[StatementDetailDist].StatementDetailDistFIDIndexes IX_StatementDetailDistInvoice_StatementDetailDistID: StatementDetailDistFIDStatementDetailDistFIDint4
No
CustomerNumbervarchar(15)15
No
InvoiceNumbervarchar(30)30
Yes
Amountmoney8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_StatementDetailDistInvoice: StatementDetailDistInvoiceIDPK_StatementDetailDistInvoiceStatementDetailDistInvoiceID
Yes
IX_StatementDetailDistInvoice_StatementDetailDistIDStatementDetailDistFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_StatementDetailDistInvoice_StatementDetailDistIDCascadeStatementDetailDistFID->[dbo].[StatementDetailDist].[SDDPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StatementDetailDistInvoice]
(
[StatementDetailDistInvoiceID] [int] NOT NULL IDENTITY(1, 1),
[StatementDetailDistFID] [int] NOT NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[InvoiceNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StatementDetailDistInvoice] ADD CONSTRAINT [PK_StatementDetailDistInvoice] PRIMARY KEY CLUSTERED  ([StatementDetailDistInvoiceID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDistInvoice_StatementDetailDistID] ON [dbo].[StatementDetailDistInvoice] ([StatementDetailDistFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StatementDetailDistInvoice] ADD CONSTRAINT [FK_StatementDetailDistInvoice_StatementDetailDistID] FOREIGN KEY ([StatementDetailDistFID]) REFERENCES [dbo].[StatementDetailDist] ([SDDPriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[StatementDetailDistInvoice] TO [MssExec]
GRANT INSERT ON  [dbo].[StatementDetailDistInvoice] TO [MssExec]
GRANT DELETE ON  [dbo].[StatementDetailDistInvoice] TO [MssExec]
GRANT UPDATE ON  [dbo].[StatementDetailDistInvoice] TO [MssExec]
GO
Uses