Production.ProductInventory Table

Information

NameProductInventory
SchemaProduction
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:54

Extended Properties

NameTypeProperty NameValue
ProductInventoryTABLEMS_DescriptionProduct inventory information.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   ProductIDint  Production.Product.ProductID
 
 
 
   LocationIDsmallint  Production.Location.LocationID
 
 
 
   Shelfnvarchar(10) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   Bintinyint   
 
 
 
   Quantitysmallint   
((0))
 
 
   rowguiduniqueidentifier   
(newid())
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_ProductInventory_ProductID_LocationIDClustered  ProductID, LocationID

Check Constraints

NameColumnEnabledTrustedExpression
CK_ProductInventory_ShelfShelf  ([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
CK_ProductInventory_BinBin  ([Bin]>=(0) AND [Bin]<=(100))

Foreign Key Constraints

NameTypeReferenced Table
FK_ProductInventory_Location_LocationIDForeign keyProduction.Location
FK_ProductInventory_Product_ProductIDForeign keyProduction.Product

SQL Script

CREATE TABLE [Production].[ProductInventory] (
    [ProductID] int NOT NULL,
    [LocationID] smallint NOT NULL,
    [Shelf] nvarchar(10) NOT NULL,
    [Bin] tinyint NOT NULL,
    [Quantity] smallint NOT NULL DEFAULT ((0)),
    [rowguid] uniqueidentifier NOT NULL DEFAULT (newid()),
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);