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,426–3,450 of 5,412

order_line, page 138 of 217
order_id→ purchase_order.order_idproduct_id→ product.product_idquantityINTEGERunit_price_centsINTEGER
342641400
3427111500
3428111500
3429131500
3430121500
3431221700
343231800
343331800
3434111500
3435111500
3436211700
343731800
3438221700
3439231700
3440151500
3441111500
3442141500
3443231700
344441400
3445141500
3446211700
3447241700
344831800
344931800
3450241700
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;