Products (T-SQL)

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    
1There are two nonclustered indexes on SupplierID.

2There are two nonclustered indexes on CategoryID.

3The UnitPrice CHECK constraint is defined as (UnitPrice >=).

4The UnitsInStock CHECK constraint is defined as (UnitsInStock >=).

5The UnitsOnOrder CHECK constraint is defined as (UnitsOnOrder >=).

6The ReorderLevel CHECK constraint is defined as (ReorderLevel >=).


  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.