Orders (T-SQL)

Column_name Data type Nullable Default Check Key/index
OrderID int no IDENTITY (1,1)   PK, clust.
CustomerID nchar(5) yes     FK Customers
(CustomerID)1
EmployeeID int yes     FK Employees
(EmployeeID)2
OrderDate datetime yes GETDATE()   Nonclust.
RequiredDate datetime yes      
ShippedDate datetime yes     Nonclust.
ShipVia int yes     FK Shippers
(ShipperID)3
Freight money yes 0    
ShipName nvarchar(40) yes      
ShipAddress nvarchar(60) yes      
ShipCity nvarchar(15) yes      
ShipRegion nvarchar(15) yes      
ShipPostalCode nvarchar(10) yes     Nonclust.
ShipCountry nvarchar(15) yes      
1There are also two nonclustered indexes on CustomerID.

2There are also two nonclustered indexes on EmployeeID.

3There is also a nonclustered index on ShipVia.


  


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