Skip to content
Louvre Ops DB

Table

order_line

Products and quantities in an order, with the price charged.

Replaces in 2020: Invoices

Rows 3,876–3,900 of 5,412

order_line, page 156 of 217
order_id→ purchase_order.order_idproduct_id→ product.product_idquantityINTEGERunit_price_centsINTEGER
387631800
3877231700
387831800
3879241700
388031800
388141400
388241400
3883111500
3884121500
3885111500
3886111500
38871601500
3888151500
388941400
3890241700
3891141500
3892151500
3893141500
3894121500
3895121500
3896211700
3897241700
389831800
3899121500
3900121500
Table definition
CREATE TABLE order_line (
  order_id         INTEGER NOT NULL REFERENCES purchase_order (order_id),
  product_id       INTEGER NOT NULL REFERENCES product (product_id),
  quantity         INTEGER NOT NULL CHECK (quantity > 0),
  unit_price_cents INTEGER NOT NULL CHECK (unit_price_cents >= 0),
  PRIMARY KEY (order_id, product_id)
) STRICT;