Tables [dbo].[ContractDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)2
Created4:57:09 PM Thursday, September 7, 2006
Last Modified11:13:38 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_ContractDetail: CDPriKeyCDPriKeyint4
No
1 - 1
Foreign Keys FK_ContractDetail_ContractMaster: [dbo].[ContractMaster].CMPriKeyCMPriKeyint4
No
Descriptionvarchar(30)30
Yes
Discountdecimal(18,0)9
Yes
Foreign Keys FK_ContractDetail_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_ContractDetail: CDPriKeyPK_ContractDetailCDPriKey
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_ContractDetail_ContractMasterCMPriKey->[dbo].[ContractMaster].[CMPriKey]
FK_ContractDetail_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ContractDetail]
(
[CDPriKey] [int] NOT NULL IDENTITY(1, 1),
[CMPriKey] [int] NOT NULL,
[Description] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Discount] [decimal] (18, 0) NULL,
[ICPriKey] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ContractDetail] ADD CONSTRAINT [PK_ContractDetail] PRIMARY KEY CLUSTERED  ([CDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ContractDetail] ADD CONSTRAINT [FK_ContractDetail_ContractMaster] FOREIGN KEY ([CMPriKey]) REFERENCES [dbo].[ContractMaster] ([CMPriKey])
GO
ALTER TABLE [dbo].[ContractDetail] ADD CONSTRAINT [FK_ContractDetail_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
GRANT SELECT ON  [dbo].[ContractDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[ContractDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[ContractDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[ContractDetail] TO [MssExec]
GO
Uses