Sales.SalesTaxRate Table

Information

NameSalesTaxRate
SchemaSales
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:55

Extended Properties

NameTypeProperty NameValue
SalesTaxRateTABLEMS_DescriptionTax rate lookup table.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   SalesTaxRateIDint   
 
 
 
   StateProvinceIDint  Person.StateProvince.StateProvinceID
 
 
 
   TaxTypetinyint   
 
 
 
   TaxRatesmallmoney   
((0.00))
 
 
   Namenvarchar(50) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   rowguiduniqueidentifier   
(newid())
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_SalesTaxRate_SalesTaxRateIDClustered  SalesTaxRateID
AK_SalesTaxRate_StateProvinceID_TaxTypeNonClustered  StateProvinceID, TaxType
AK_SalesTaxRate_rowguidNonClustered  rowguid

Check Constraints

NameColumnEnabledTrustedExpression
CK_SalesTaxRate_TaxTypeTaxType  ([TaxType]>=(1) AND [TaxType]<=(3))

Foreign Key Constraints

NameTypeReferenced Table
FK_SalesTaxRate_StateProvince_StateProvinceIDForeign keyPerson.StateProvince

SQL Script

CREATE TABLE [Sales].[SalesTaxRate] (
    [SalesTaxRateID] int NOT NULL IDENTITY,
    [StateProvinceID] int NOT NULL,
    [TaxType] tinyint NOT NULL,
    [TaxRate] smallmoney NOT NULL DEFAULT ((0.00)),
    [Name] nvarchar(50) NOT NULL,
    [rowguid] uniqueidentifier NOT NULL DEFAULT (newid()),
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE UNIQUE INDEX [AK_SalesTaxRate_StateProvinceID_TaxType] on [Sales].[SalesTaxRate]([StateProvinceID], [TaxType]);
CREATE UNIQUE INDEX [AK_SalesTaxRate_rowguid] on [Sales].[SalesTaxRate]([rowguid]);