Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table sales_orders (
- id int primary key,
- ...
- );
- create table order_items (
- order_id int references sales_orders(id),
- line_number smallint,
- unit_price decimal(19,4) not null,
- quantity smallint not null default 1,
- product_id int not null references products(id),
- ...
- primary key (order_id, line_number)
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement