Tables [dbo].[OrdMaterial]
Properties
PropertyValue
Row Count (~)122217
Created4:57:08 PM Thursday, September 7, 2006
Last Modified3:48:40 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_OrdMaterial: OMPriKeyOMPriKeyint4
No
1 - 1
Foreign Keys FK_OrdMaterial_ORDERS: [dbo].[Orders].ORDPriKeyIndexes IX_OrdMaterial_OrdPriKey: ORDPriKeyIndexes IX_OrdMaterial_Order_MaterialItemCodeMap: ORDPriKey\MaterialItemCodeMapFIDORDPriKeyint4
Yes
EstQuantityint4
Yes
Foreign Keys FK_OrdMaterial_MaterialItemCodeMap: [dbo].[MaterialItemCodeMap].MaterialItemCodeMapFIDIndexes IX_OrdMaterial_MaterialItemCodeMap: MaterialItemCodeMapFIDIndexes IX_OrdMaterial_Order_MaterialItemCodeMap: ORDPriKey\MaterialItemCodeMapFIDMaterialItemCodeMapFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_OrdMaterial: OMPriKeyPK_OrdMaterialOMPriKey
Yes
80
IX_OrdMaterial_Order_MaterialItemCodeMapORDPriKey, MaterialItemCodeMapFID
Yes
IX_OrdMaterial_MaterialItemCodeMapMaterialItemCodeMapFID80
IX_OrdMaterial_OrdPriKeyORDPriKey80
Foreign Keys Foreign Keys
NameColumns
FK_OrdMaterial_MaterialItemCodeMapMaterialItemCodeMapFID->[dbo].[MaterialItemCodeMap].[MaterialItemCodeMapID]
FK_OrdMaterial_ORDERSORDPriKey->[dbo].[Orders].[PriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[OrdMaterial]
(
[OMPriKey] [int] NOT NULL IDENTITY(1, 1),
[ORDPriKey] [int] NULL,
[EstQuantity] [int] NULL,
[MaterialItemCodeMapFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrdMaterial] ADD CONSTRAINT [PK_OrdMaterial] PRIMARY KEY CLUSTERED  ([OMPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrdMaterial] ADD CONSTRAINT [IX_OrdMaterial_Order_MaterialItemCodeMap] UNIQUE NONCLUSTERED  ([ORDPriKey], [MaterialItemCodeMapFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OrdMaterial_MaterialItemCodeMap] ON [dbo].[OrdMaterial] ([MaterialItemCodeMapFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OrdMaterial_OrdPriKey] ON [dbo].[OrdMaterial] ([ORDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrdMaterial] ADD CONSTRAINT [FK_OrdMaterial_MaterialItemCodeMap] FOREIGN KEY ([MaterialItemCodeMapFID]) REFERENCES [dbo].[MaterialItemCodeMap] ([MaterialItemCodeMapID])
GO
ALTER TABLE [dbo].[OrdMaterial] ADD CONSTRAINT [FK_OrdMaterial_ORDERS] FOREIGN KEY ([ORDPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON  [dbo].[OrdMaterial] TO [MssExec]
GRANT INSERT ON  [dbo].[OrdMaterial] TO [MssExec]
GRANT DELETE ON  [dbo].[OrdMaterial] TO [MssExec]
GRANT UPDATE ON  [dbo].[OrdMaterial] TO [MssExec]
GO
Uses
Used By