Purchasing.PurchaseOrderHeader Table
Information
| Name | PurchaseOrderHeader |
| Schema | Purchasing |
| Row Count | 0 |
| Data Size | |
| Index Size | |
| Reserved Size | |
| Unused Size | |
| Created | 29.3.2010. 21:58:18 |
| Modified | 29.3.2010. 21:58:56 |
Extended Properties
| Name | Type | Property Name | Value |
| PurchaseOrderHeader | TABLE | MS_Description | General purchase order information. See PurchaseOrderDetail. |
Columns
| PK | Key | Identity | Name | Data Type | Allow Nulls | Collation | References | Default | Computed | Compute Expression |
|   |   |   | PurchaseOrderID | int |   | | | |   | |
| |   |   | RevisionNumber | tinyint |   | | | ((0)) |   | |
| |   |   | Status | tinyint |   | | | ((1)) |   | |
| |   |   | EmployeeID | int |   | | HumanResources.Employee.EmployeeID | |   | |
| |   |   | VendorID | int |   | | Purchasing.Vendor.VendorID | |   | |
| |   |   | ShipMethodID | int |   | | Purchasing.ShipMethod.ShipMethodID | |   | |
| |   |   | OrderDate | datetime |   | | | (getdate()) |   | |
| |   |   | ShipDate | datetime |   | | | |   | |
| |   |   | SubTotal | money |   | | | ((0.00)) |   | |
| |   |   | TaxAmt | money |   | | | ((0.00)) |   | |
| |   |   | Freight | money |   | | | ((0.00)) |   | |
| |   |   | TotalDue | money |   | | | |   | (isnull(([SubTotal]+[TaxAmt])+[Freight],(0))) |
| |   |   | ModifiedDate | datetime |   | | | (getdate()) |   | |
Indexes
Check Constraints
Foreign Key Constraints
Triggers
| Name | Activates on | Instead Of | For Replication | Enabled | Created | Modified |
| uPurchaseOrderHeader | UPDATE |   |   |   | 29.3.2010. 21:58:56 | 29.3.2010. 21:58:56 |
SQL Script
CREATE TABLE [Purchasing].[PurchaseOrderHeader] (
[PurchaseOrderID] int NOT NULL IDENTITY,
[RevisionNumber] tinyint NOT NULL DEFAULT ((0)),
[Status] tinyint NOT NULL DEFAULT ((1)),
[EmployeeID] int NOT NULL,
[VendorID] int NOT NULL,
[ShipMethodID] int NOT NULL,
[OrderDate] datetime NOT NULL DEFAULT (getdate()),
[ShipDate] datetime NULL,
[SubTotal] money NOT NULL DEFAULT ((0.00)),
[TaxAmt] money NOT NULL DEFAULT ((0.00)),
[Freight] money NOT NULL DEFAULT ((0.00)),
[TotalDue] money NOT NULL,
[ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE INDEX [IX_PurchaseOrderHeader_VendorID] on [Purchasing].[PurchaseOrderHeader]([VendorID]);
CREATE INDEX [IX_PurchaseOrderHeader_EmployeeID] on [Purchasing].[PurchaseOrderHeader]([EmployeeID]);