From dbscript Online Help
wikibot
Table
|
Sales.SalesOrderHeader
|
Column
|
Data Type
|
Nullable
|
Default
|
PK
|
Index
|
SalesOrderID
|
int
|
not null
|
|
PK_SalesOrderHeader_SalesOrderID
|
|
RevisionNumber
|
tinyint
|
not null
|
((0))
|
|
|
OrderDate
|
datetime
|
not null
|
(getdate())
|
|
|
DueDate
|
datetime
|
not null
|
|
|
|
ShipDate
|
datetime
|
null
|
|
|
|
Status
|
tinyint
|
not null
|
((1))
|
|
|
OnlineOrderFlag
|
dbo.Flag
|
not null
|
((1))
|
|
|
SalesOrderNumber
|
|
|
|
|
AK_SalesOrderHeader_SalesOrderNumber
|
PurchaseOrderNumber
|
dbo.OrderNumber
|
null
|
|
|
|
AccountNumber
|
dbo.AccountNumber
|
null
|
|
|
|
CustomerID
|
int
|
not null
|
|
|
IX_SalesOrderHeader_CustomerID
|
ContactID
|
int
|
not null
|
|
|
|
SalesPersonID
|
int
|
null
|
|
|
IX_SalesOrderHeader_SalesPersonID
|
TerritoryID
|
int
|
null
|
|
|
|
BillToAddressID
|
int
|
not null
|
|
|
|
ShipToAddressID
|
int
|
not null
|
|
|
|
ShipMethodID
|
int
|
not null
|
|
|
|
CreditCardID
|
int
|
null
|
|
|
|
CreditCardApprovalCode
|
varchar(15)
|
null
|
|
|
|
CurrencyRateID
|
int
|
null
|
|
|
|
SubTotal
|
money
|
not null
|
((0.00))
|
|
|
TaxAmt
|
money
|
not null
|
((0.00))
|
|
|
Freight
|
money
|
not null
|
((0.00))
|
|
|
TotalDue
|
|
|
|
|
|
Comment
|
nvarchar(128)
|
null
|
|
|
|
rowguid
|
uniqueidentifier
|
not null
|
(newid())
|
|
AK_SalesOrderHeader_rowguid
|
ModifiedDate
|
datetime
|
not null
|
(getdate())
|
|
|
Triggers
|
Type
|
uSalesOrderHeader
|
ON UPDATE
|