AdventureWorks Database > Sales Schema : Sales.SalesOrderHeaderSalesReason Table |
Creation Date | 08/01/2010 08:40 |
File Group | PRIMARY |
Text File Group | |
System Object | ![]() |
Published for Replication | ![]() |
Rows | 27647 |
Data Space Used | 688.00 KB |
Index Space Used | 16.00 KB |
Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
---|---|---|---|---|---|---|---|
![]() | SalesOrderID | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. | int | 4 | |||
![]() | SalesReasonID | Primary key. Foreign key to SalesReason.SalesReasonID. | int | 4 | |||
ModifiedDate | Date and time the record was last updated. | datetime | 4 | (getdate()) |
Index | Description | Primary | Unique |
---|---|---|---|
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID | Primary key (clustered) constraint | ![]() | ![]() |
Relationship | Description |
---|---|
FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID | Foreign key constraint referencing SalesOrderHeader.SalesOrderID. |
FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID | Foreign key constraint referencing SalesReason.SalesReasonID. |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
![]() | dbo.AccountNumber | User Defined Data Type | 2 | |
![]() | Person.Address | Table | Street address information for customers, employees, and vendors. | 2 |
![]() | Person.Contact | Table | Names of each employee, customer contact, and vendor contact. | 2 |
![]() | Person.CountryRegion | Table | Lookup table containing the ISO standard codes for countries and regions. | 4 |
![]() | Sales.CreditCard | Table | Customer credit card information. | 2 |
![]() | Sales.Currency | Table | Lookup table containing standard ISO currencies. | 3 |
![]() | Sales.CurrencyRate | Table | Currency exchange rates. | 2 |
![]() | Sales.Customer | Table | Current customer information. Also see the Individual and Store tables. | 2 |
![]() | HumanResources.Employee | Table | Employee information such as salary, department, and title. | 3 |
![]() | dbo.ErrorLog | Table | Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct. | 3 |
![]() | dbo.Flag | User Defined Data Type | 2 | |
![]() | dbo.Name | User Defined Data Type | 2 | |
![]() | dbo.NameStyle | User Defined Data Type | 3 | |
![]() | dbo.OrderNumber | User Defined Data Type | 2 | |
![]() | dbo.Phone | User Defined Data Type | 3 | |
![]() | Sales.SalesOrderHeader | Table | General sales order information. | 1 |
![]() | Sales.SalesPerson | Table | Sales representative current information. | 2 |
![]() | Sales.SalesReason | Table | Lookup table of customer purchase reasons. | 1 |
![]() | Sales.SalesTerritory | Table | Sales territory lookup table. | 2 |
![]() | Purchasing.ShipMethod | Table | Shipping company lookup table. | 2 |
![]() | Person.StateProvince | Table | State and province lookup table. | 3 |
![]() | dbo.ufnGetAccountingEndDate | User Defined Function | Scalar function used in the uSalesOrderHeader trigger to set the starting account date. | 2 |
![]() | dbo.ufnGetAccountingStartDate | User Defined Function | Scalar function used in the uSalesOrderHeader trigger to set the ending account date. | 2 |
![]() | dbo.ufnLeadingZeros | User Defined Function | Scalar function used by the Sales.Customer table to help set the account number. | 3 |
![]() | dbo.uspLogError | Stored Procedure | Logs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information. | 2 |
![]() | dbo.uspPrintError | Stored Procedure | Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information. | 2 |
|