Tables [dbo].[AllocationDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)25
Created4:57:09 PM Thursday, September 7, 2006
Last Modified11:13:37 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_AllocationDetail: ADPriKeyADPriKeyint4
No
1 - 1
Foreign Keys FK_AllocationDetail_AllocationMaster: [dbo].[AllocationMaster].AMPriKeyAMPriKeyint4
No
Foreign Keys FK_AllocationDetail_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
Yes
Check Constraints CK_AllocationDetail_Percentage : ([Percentage]>(0))Percentagefloat8
No
Typevarchar(10)10
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_AllocationDetail: ADPriKeyPK_AllocationDetailADPriKey
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_AllocationDetail_PercentagePercentage([Percentage]>(0))
Foreign Keys Foreign Keys
NameColumns
FK_AllocationDetail_AllocationMasterAMPriKey->[dbo].[AllocationMaster].[AMPriKey]
FK_AllocationDetail_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AllocationDetail]
(
[ADPriKey] [int] NOT NULL IDENTITY(1, 1),
[AMPriKey] [int] NOT NULL,
[ICPriKey] [int] NULL,
[Percentage] [float] NOT NULL,
[Type] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllocationDetail] ADD CONSTRAINT [CK_AllocationDetail_Percentage] CHECK (([Percentage]>(0)))
GO
ALTER TABLE [dbo].[AllocationDetail] ADD CONSTRAINT [PK_AllocationDetail] PRIMARY KEY CLUSTERED  ([ADPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllocationDetail] ADD CONSTRAINT [FK_AllocationDetail_AllocationMaster] FOREIGN KEY ([AMPriKey]) REFERENCES [dbo].[AllocationMaster] ([AMPriKey])
GO
ALTER TABLE [dbo].[AllocationDetail] ADD CONSTRAINT [FK_AllocationDetail_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
GRANT SELECT ON  [dbo].[AllocationDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[AllocationDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[AllocationDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[AllocationDetail] TO [MssExec]
GO
Uses