Purchasing.Vendor Table
Information
| Name | Vendor |
| 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 |
| Vendor | TABLE | MS_Description | Companies from whom Adventure Works Cycles purchases parts or other goods. |
Columns
| PK | Key | Identity | Name | Data Type | Allow Nulls | Collation | References | Default | Computed | Compute Expression |
|   |   |   | VendorID | int |   | | | |   | |
| |   |   | AccountNumber | nvarchar(15) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | Name | nvarchar(50) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | CreditRating | tinyint |   | | | |   | |
| |   |   | PreferredVendorStatus | bit |   | | | ((1)) |   | |
| |   |   | ActiveFlag | bit |   | | | ((1)) |   | |
| |   |   | PurchasingWebServiceURL | nvarchar(1024) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | ModifiedDate | datetime |   | | | (getdate()) |   | |
Indexes
Check Constraints
| Name | Column | Enabled | Trusted | Expression |
| CK_Vendor_CreditRating | CreditRating |   |   | ([CreditRating]>=(1) AND [CreditRating]<=(5)) |
Triggers
| Name | Activates on | Instead Of | For Replication | Enabled | Created | Modified |
| dVendor | DELETE |   |   |   | 29.3.2010. 21:58:56 | 29.3.2010. 21:58:56 |
SQL Script
CREATE TABLE [Purchasing].[Vendor] (
[VendorID] int NOT NULL IDENTITY,
[AccountNumber] nvarchar(15) NOT NULL,
[Name] nvarchar(50) NOT NULL,
[CreditRating] tinyint NOT NULL,
[PreferredVendorStatus] bit NOT NULL DEFAULT ((1)),
[ActiveFlag] bit NOT NULL DEFAULT ((1)),
[PurchasingWebServiceURL] nvarchar(1024) NULL,
[ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE UNIQUE INDEX [AK_Vendor_AccountNumber] on [Purchasing].[Vendor]([AccountNumber]);