I have a problem. I have a 2 table which is table orders
and table delivery
. table order has column order_recieved
. by default NULL
. and table delivery has column delivery_status
with value order shipped
. now, if customer click a button to update order_received
, the column will change NULL
value to Recieved
value. and my problem is how column delivery_status
will also change to order shipped
value to complete
value? the PK table orders
is order_no
and FK table delivery
is orderFK
.
Can someone help me how to update the value?
Asked
Active
Viewed 53 times
0

jack98
- 69
- 6
-
1Please provide sample data, desired results, and an appropriate database tag. – Gordon Linoff Dec 28 '20 at 14:27
-
1you'll need to issue two separate update statements for two different tables. no way around that. – Jeremy Dec 28 '20 at 14:28
1 Answers
0
You can only update one table per update statement. I'd recommend sticking them both in the same stored procedure so that you can make one database call and have both values updated.

Wellerman
- 846
- 4
- 14