Difference between revisions of "Sales.SalesTaxRate (table)"
| (8 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| − | |- | + | |- valign="top" |
| '''Table | | '''Table | ||
| Sales.SalesTaxRate | | Sales.SalesTaxRate | ||
| − | |- | + | |- valign="top" |
| + | | '''Description | ||
| + | | Tax rate lookup table. | ||
|} | |} | ||
| − | + | === Columns === | |
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 15: | Line 17: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
| − | | ''' | + | | '''Description |
| − | + | ||
| − | + | |- valign="top" | |
| − | |- | ||
| SalesTaxRateID | | SalesTaxRateID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | Primary key for SalesTaxRate records. |
| − | + | |- valign="top" | |
| − | |- | ||
| StateProvinceID | | StateProvinceID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | State, province, or country/region the sales tax applies to. |
| − | + | |- valign="top" | |
| − | |- | ||
| TaxType | | TaxType | ||
| tinyint | | tinyint | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions. |
| − | + | |- valign="top" | |
| − | |- | ||
| TaxRate | | TaxRate | ||
| smallmoney | | smallmoney | ||
| not null | | not null | ||
| ((0.00)) | | ((0.00)) | ||
| − | | | + | | Tax rate amount. |
| − | + | |- valign="top" | |
| − | |- | ||
| Name | | Name | ||
| dbo.Name | | dbo.Name | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | Tax rate description. |
| − | + | |- valign="top" | |
| − | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (newid()) | | (newid()) | ||
| − | | | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
| − | + | |- valign="top" | |
| − | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
| − | | | + | | Date and time the record was last updated. |
| − | | | + | |} |
| + | |||
| + | === Primary Key === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Primary Key | ||
| + | | '''Columns | ||
| + | |- valign="top" | ||
| + | | PK_SalesTaxRate_SalesTaxRateID | ||
| + | | SalesTaxRateID | ||
| + | |} | ||
| + | |||
| + | === Indexes === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Index | ||
| + | | '''Type | ||
| + | | '''Columns | ||
| + | |||
| + | |- valign="top" | ||
| + | | AK_SalesTaxRate_rowguid | ||
| + | | Unique | ||
| + | | rowguid | ||
| + | |- valign="top" | ||
| + | | AK_SalesTaxRate_StateProvinceID_TaxType | ||
| + | | Unique | ||
| + | | StateProvinceID, TaxType | ||
|} | |} | ||
| + | === Check Constraints === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Check Constraint | ||
| + | | '''Expression | ||
| + | | '''Description | ||
| + | |- valign="top" | ||
| + | | CK_SalesTaxRate_TaxType | ||
| + | | ([TaxType]>=(1) AND [TaxType]<=(3)) | ||
| + | | Check constraint [TaxType] BETWEEN (1) AND (3) | ||
| + | |} | ||
| + | === Foreign Keys === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 76: | Line 109: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
| − | + | ||
| − | |- | + | |- valign="top" |
| [[Person.StateProvince_(table)|Person.StateProvince]] | | [[Person.StateProvince_(table)|Person.StateProvince]] | ||
| StateProvinceID | | StateProvinceID | ||
| StateProvinceID | | StateProvinceID | ||
|} | |} | ||
| + | |||
| + | === References === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Dependency Type | ||
| + | | '''Object Type | ||
| + | | '''Referenced Object | ||
| + | |||
| + | |- valign="top" | ||
| + | | Data Type | ||
| + | | Type | ||
| + | | [[dbo.Name_(type)|dbo.Name]] | ||
| + | |||
| + | |- valign="top" | ||
| + | | Schema | ||
| + | | Schema | ||
| + | | [[Sales_(schema)|Sales]] | ||
| + | |||
| + | |} | ||
| + | |||
| + | |||
== automatically generated == | == automatically generated == | ||
| Line 88: | Line 142: | ||
| '''Table | | '''Table | ||
| Sales.SalesTaxRate | | Sales.SalesTaxRate | ||
| − | |- | + | |- valign="top" |
| − | |||
| '''Description | | '''Description | ||
| Tax rate lookup table. | | Tax rate lookup table. | ||
|- | |- | ||
| − | |||
|} | |} | ||
| Line 110: | Line 162: | ||
| not null | | not null | ||
| | | | ||
| − | | Primary key for SalesTaxRate records.PK_SalesTaxRate_SalesTaxRateID | + | | Primary key for SalesTaxRate records.<br />PK_SalesTaxRate_SalesTaxRateID |
|- valign="top" | |- valign="top" | ||
| StateProvinceID | | StateProvinceID | ||
| Line 116: | Line 168: | ||
| not null | | not null | ||
| | | | ||
| − | | State, province, or country/region the sales tax applies to.AK_SalesTaxRate_StateProvinceID_TaxType | + | | State, province, or country/region the sales tax applies to.<br />AK_SalesTaxRate_StateProvinceID_TaxType |
|- valign="top" | |- valign="top" | ||
| TaxType | | TaxType | ||
| Line 122: | Line 174: | ||
| not null | | not null | ||
| | | | ||
| − | | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.AK_SalesTaxRate_StateProvinceID_TaxType | + | | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.<br />AK_SalesTaxRate_StateProvinceID_TaxType |
|- valign="top" | |- valign="top" | ||
| TaxRate | | TaxRate | ||
| Line 128: | Line 180: | ||
| not null | | not null | ||
| (0.00) | | (0.00) | ||
| − | | Tax rate amount. | + | | Tax rate amount.<br /> |
|- valign="top" | |- valign="top" | ||
| Name | | Name | ||
| Line 134: | Line 186: | ||
| not null | | not null | ||
| | | | ||
| − | | Tax rate description. | + | | Tax rate description.<br /> |
|- valign="top" | |- valign="top" | ||
| rowguid | | rowguid | ||
| Line 140: | Line 192: | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
| − | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_SalesTaxRate_rowguid | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.<br />AK_SalesTaxRate_rowguid |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
| Line 146: | Line 198: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
| − | | Date and time the record was last updated. | + | | Date and time the record was last updated.<br /> |
|} | |} | ||
| Line 166: | Line 218: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| + | | '''Dependency Type | ||
| + | | '''Object Type | ||
| '''Referenced Object | | '''Referenced Object | ||
| − | + | ||
| − | |||
| − | |||
|- | |- | ||
| + | | Data Type | ||
| + | | Type | ||
| [[dbo.Name_(type)|dbo.Name]] | | [[dbo.Name_(type)|dbo.Name]] | ||
| − | | | + | |
| − | | | + | |- |
| + | | Schema | ||
| + | | Schema | ||
| + | | [[Sales_(schema)|Sales]] | ||
| + | |||
|} | |} | ||
Latest revision as of 09:56, 27 August 2011
Contents
wikibot[edit]
| Table | Sales.SalesTaxRate |
| Description | Tax rate lookup table. |
Columns[edit]
| Column | Data Type | Nullable | Default | Description |
| SalesTaxRateID | int | not null | Primary key for SalesTaxRate records. | |
| StateProvinceID | int | not null | State, province, or country/region the sales tax applies to. | |
| TaxType | tinyint | not null | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions. | |
| TaxRate | smallmoney | not null | ((0.00)) | Tax rate amount. |
| Name | dbo.Name | not null | Tax rate description. | |
| rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
| ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Primary Key[edit]
| Primary Key | Columns |
| PK_SalesTaxRate_SalesTaxRateID | SalesTaxRateID |
Indexes[edit]
| Index | Type | Columns |
| AK_SalesTaxRate_rowguid | Unique | rowguid |
| AK_SalesTaxRate_StateProvinceID_TaxType | Unique | StateProvinceID, TaxType |
Check Constraints[edit]
| Check Constraint | Expression | Description |
| CK_SalesTaxRate_TaxType | ([TaxType]>=(1) AND [TaxType]<=(3)) | Check constraint [TaxType] BETWEEN (1) AND (3) |
Foreign Keys[edit]
| Relation | Column | Referenced Column |
| Person.StateProvince | StateProvinceID | StateProvinceID |
References[edit]
| Dependency Type | Object Type | Referenced Object |
| Data Type | Type | dbo.Name |
| Schema | Schema | Sales |
automatically generated[edit]
| Table | Sales.SalesTaxRate |
| Description | Tax rate lookup table. |
| Column | Data Type | Nullable | Default | Description / PK / Index |
| SalesTaxRateID | int | not null | Primary key for SalesTaxRate records. PK_SalesTaxRate_SalesTaxRateID | |
| StateProvinceID | int | not null | State, province, or country/region the sales tax applies to. AK_SalesTaxRate_StateProvinceID_TaxType | |
| TaxType | tinyint | not null | 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions. AK_SalesTaxRate_StateProvinceID_TaxType | |
| TaxRate | smallmoney | not null | (0.00) | Tax rate amount. |
| Name | Name | not null | Tax rate description. | |
| rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_SalesTaxRate_rowguid |
| ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
| Relation | Column | Referenced Column |
| Person.StateProvince | StateProvinceID | StateProvinceID |
| Dependency Type | Object Type | Referenced Object |
| Data Type | Type | dbo.Name |
| Schema | Schema | Sales |