Databases > AdventureWorks2019 > Tables > Production.TransactionHistoryArchive

AdventureWorks2019

Production.TransactionHistoryArchive

//
Transactions for previous years.

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    TransactionID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    ProductID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    ReferenceOrderID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    ReferenceOrderLineID
    [int] NOT NULL DEFAULT ((0))
  • //
    ${escapify(column.description)}
    TransactionDate
    [datetime] NOT NULL DEFAULT (getdate())
  • //
    ${escapify(column.description)}
    TransactionType
    [nchar](1) NOT NULL
    //
    CONSTRAINT: Check constraint [TransactionType]='p' OR [TransactionType]='s' OR [TransactionType]='w' OR [TransactionType]='P' OR [TransactionType]='S' OR [TransactionType]='W'
    (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')
  • //
    ${escapify(column.description)}
    Quantity
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    ActualCost
    [money] NOT NULL
  • //
    ${escapify(column.description)}
    ModifiedDate
    [datetime] NOT NULL DEFAULT (getdate())

Indexes

  • //
    Clustered index created by a primary key constraint.
    PK_TransactionHistoryArchive_TransactionID
    UNIQUE CLUSTERED
    TransactionID
  • //
    Nonclustered index.
    IX_TransactionHistoryArchive_ProductID
    NONCLUSTERED
    ProductID
  • //
    Nonclustered index.
    IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
    NONCLUSTERED
    ReferenceOrderID , ReferenceOrderLineID

Sample Data

TransactionID
ProductID
ReferenceOrderID
ReferenceOrderLineID
TransactionDate
TransactionType
Quantity
ActualCost
ModifiedDate
1
1
1
1
P
4
50.26
2
359
2
1
P
3
45.12
3
360
2
2
P
3
45.5805
4
530
3
1
P
550
16.086
5
4
4
1
P
3
57.0255
6
512
5
1
P
550
37.086
7
513
6
1
P
550
26.5965
8
317
7
1
P
550
27.0585
9
318
7
2
P
550
33.579
10
319
7
3
P
550
46.0635
11
403
8
1
P
3
47.4705
12
404
8
2
P
3
45.3705
13
405
8
3
P
3
49.644
14
406
8
4
P
3
45.3705
15
407
8
5
P
3
43.2705
16
709
43659
10
S
6
6.175
17
711
43659
12
S
4
20.1865
18
712
43659
11
S
2
5.6187
19
714
43659
8
S
3
31.2437
20
716
43659
9
S
1
31.2437
21
771
43659
4
S
1
2447.9928
22
772
43659
5
S
1
2447.9928
23
773
43659
6
S
2
2447.9928
24
774
43659
7
S
1
2447.9928
25
776
43659
1
S
1
2429.9928