Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.45 KB | None | 0 0
  1. CREATE TABLE Order_items(
  2.  
  3. order_item_id number(2) not null,
  4. job_id number(2) not null,
  5. task_id number(2) not null,
  6. quantity number(6) not null,
  7. cost number(6,2) not null,
  8. other_details varchar2(128)
  9. );
  10.  
  11. ALTER TABLE Order_items ADD CONSTRAINT PRIMARY KEY (order_item_id);
  12. ALTER TABLE Order_items ADD CONSTRAINT FOREIGN KEY (job_id) REFERENCES Jobs(job_id);
  13. ALTER TABLE Order_items ADD CONSTRAINT FOREIGN KEY (task_id) REFERENCES Standard_Tasks(task_id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement