Prevent the entrance of a shipment into the system unless there is an outstanding order for the goods to be shipped.
CURRENT_SHIPMENT columns ORDER_ID and SHIPMENT_NUM to ORDERS columns ORDER_ID and SHIPMENT_ID
ALTER TABLE CURRENT_SHIPMENTS ADD FOREIGN KEY
(ORDER_ID, SHIPMENT_NUM) REFERENCES
ORDERS(ORDER_ID, SHIPMENT_ID)
Note: The columns referenced by a foreign key must correspond to the primary key of the referenced table.
|
Copyright © 2014 CA.
All rights reserved.
|
|