Orders

Transact-SQL Reference

Transact-SQL Reference

Orders

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

1  There are also two nonclustered indexes on CustomerID.
2  There are also two nonclustered indexes on EmployeeID.
3  There is also a nonclustered index on ShipVia.