Advertisement
elena1234

add constraint on a existing table ( MySQL )

Feb 8th, 2023 (edited)
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.14 KB | Source Code | 0 0
  1. ALTER TABLE ORDERS
  2. ADD  CONSTRAINT FK_CustomerOrder
  3.      FOREIGN KEY (customer_id)
  4.      REFERENCES CUSTOMERS(CUSTOMER_ID) on DELETE CASCADE;
  5.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement