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,326–3,350 of 5,412

order_line, page 134 of 217
order_id→ purchase_order.order_idproduct_id→ product.product_idquantityINTEGERunit_price_centsINTEGER
3326231700
332731800
3328151500
332941400
3330151500
3331111500
333231800
333331800
3334221700
3335111500
333641400
3337111500
3338121500
3339211700
334031800
3341121500
3342121500
3343121500
3344141500
334531800
3346221700
334741400
3348221700
3349121500
3350121500
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;