Databases > AdventureWorks2019 > Tables > Production.ProductInventory

AdventureWorks2019

Production.ProductInventory

//
Product inventory information.

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    ProductID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    LocationID
    [smallint] NOT NULL
  • //
    ${escapify(column.description)}
    Shelf
    [nvarchar](10) NOT NULL
    //
    CONSTRAINT: Check constraint [Shelf] like '[A-Za-z]' OR [Shelf]='N/A'
    ([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
  • //
    ${escapify(column.description)}
    Bin
    [tinyint] NOT NULL
    //
    CONSTRAINT: Check constraint [Bin] BETWEEN (0) AND (100)
    ([Bin]>=(0) AND [Bin]<=(100))
  • //
    ${escapify(column.description)}
    Quantity
    [smallint] NOT NULL DEFAULT ((0))
  • //
    ${escapify(column.description)}
    rowguid
    [uniqueidentifier] NOT NULL DEFAULT (newid())
  • //
    ${escapify(column.description)}
    ModifiedDate
    [datetime] NOT NULL DEFAULT (getdate())

Indexes

  • //
    Clustered index created by a primary key constraint.
    PK_ProductInventory_ProductID_LocationID
    UNIQUE CLUSTERED
    ProductID , LocationID

Foreign Keys

  • //
    Foreign key constraint referencing Location.LocationID.
    FK_ProductInventory_Location_LocationID
    Production.Location
    LocationID ⥱ LocationID
  • //
    Foreign key constraint referencing Product.ProductID.
    FK_ProductInventory_Product_ProductID
    Production.Product
    ProductID ⥱ ProductID

Sample Data

ProductID
LocationID
Shelf
Bin
Quantity
rowguid
ModifiedDate
1
1
A
1
408
47A24246-6C43-48EB-968F-025738A8A410
1
6
B
5
324
D4544D7D-CAF5-46B3-AB22-5718DCC26B5E
1
50
A
5
353
BFF7DC60-96A8-43CA-81A7-D6D2ED3000A8
2
1
A
2
427
F407C07A-CA14-4684-A02C-608BD00C2233
2
6
B
1
318
CA1FF2F4-48FB-4960-8D92-3940B633E4C1
2
50
A
6
364
D38CFBEE-6347-47B1-B033-0E278CCA03E2
3
1
A
7
585
E18A519B-FB5E-4051-874C-58CD58436C95
3
6
B
9
443
3C860C96-15FF-4DF4-91D7-B237FF64480F
3
50
A
10
324
1339E5E3-1F8E-4B82-A447-A8666A264F0C
4
1
A
6
512
6BEAF0A0-971A-4CE1-96FE-692807D5DC00
4
6
B
10
422
2C82427A-63F1-4877-A1F6-A27B4D201EB6
4
50
A
11
388
FD912E69-EFA2-4AB7-82A4-03F5101AF11C
316
5
A
11
532
1EE3DBD3-2A7E-47DC-AF99-1B585575EFB9
316
10
B
1
388
CB2A24D7-9B70-4140-8836-9EB7592621D3
316
50
B
8
441
36B375A3-022A-45BF-B425-DBFFAAC3145A
317
1
C
1
283
C04FC1CF-1D2B-4480-BA13-64C6EF780F4B
317
5
A
1
158
83332A73-48A9-401D-95F4-385C944D716F
317
50
A
21
152
4072C90C-A867-4F64-882F-EC45ADA1B79C
318
1
C
2
136
F287EFD3-CCC5-4344-9F4A-E588BBF29801
318
5
A
2
171
B62232E8-90B5-4DA1-BFE1-453AA1917EFC
318
50
A
22
132
D758C516-D9BF-4AA6-8E57-F5BD6D568F97
319
1
C
3
308
7367821F-BB8B-4102-86ED-A7FB7054F8E1
319
5
A
3
184
BFB760AC-0767-4F76-8670-49488D0F731D
319
50
A
23
305
FEBBCC76-2764-48A3-A086-77D1E883137C
320
1
C
4
481
BD134ECD-D4DA-406C-A7CE-7EC40F9BCF34