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