如何执行查询并设置完成值= 1如果0反之亦然,我尝试了这段代码但是没有工作:
UPDATE orders set orders.done=1 inner
JOIN mydate on orders.order_no=mydate.order_no and orders.date=mydate.order_date
where done.orders=0
答案 0 :(得分:0)
试试这个:
UPDATE orders
join mydate on orders.order_no=mydate.order_no and orders.date=mydate.order_date
set orders.done=1
where order.orders=0