Products

Transact-SQL Reference

Transact-SQL Reference

Products

Column_name Data type Nullable Default Check Key/index
ProductID int no IDENTITY (1,1)   PK, clust.
ProductName nvarchar(40) no Nonclust.
SupplierID int yes FK Suppliers(SupplierID), nonclust.1
CategoryID int yes FK Categories(CategoryID), nonclust.2
QuantityPerUnit nvarchar(20) yes
UnitPrice money yes 0 yes3
UnitsInStock smallint yes 0 yes4
UnitsOnOrder smallint yes 0 yes5
ReorderLevel smallint yes 0 yes6
Discontinued bit no 0

1  There are two nonclustered indexes on SupplierID.
2  There are two nonclustered indexes on CategoryID.
3  The UnitPrice CHECK constraint is defined as (UnitPrice >=).
4  The UnitsInStock CHECK constraint is defined as (UnitsInStock >=).
5  The UnitsOnOrder CHECK constraint is defined as (UnitsOnOrder >=).
6  The ReorderLevel CHECK constraint is defined as (ReorderLevel >=).