Purchasing.Vendor Table

Information

NameVendor
SchemaPurchasing
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:56

Extended Properties

NameTypeProperty NameValue
VendorTABLEMS_DescriptionCompanies from whom Adventure Works Cycles purchases parts or other goods.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   VendorIDint   
 
 
 
   AccountNumbernvarchar(15) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   Namenvarchar(50) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   CreditRatingtinyint   
 
 
 
   PreferredVendorStatusbit   
((1))
 
 
   ActiveFlagbit   
((1))
 
 
   PurchasingWebServiceURLnvarchar(1024) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_Vendor_VendorIDClustered  VendorID
AK_Vendor_AccountNumberNonClustered  AccountNumber

Check Constraints

NameColumnEnabledTrustedExpression
CK_Vendor_CreditRatingCreditRating  ([CreditRating]>=(1) AND [CreditRating]<=(5))

Triggers

NameActivates onInstead OfFor ReplicationEnabledCreatedModified
dVendorDELETE   29.3.2010. 21:58:5629.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]);