mysql多表查詢求和,MYSQL怎么實現兩個表求和相減求這樣的SQL語句?
delimiter//
createtriggertrigger1afterupdateonbforeachrow
begin
declareslint;
setsl=new.退貨數量;
updateaset數量=數量-sl;
end//
delimiter//
createtriggertrigger1afterupdateonbforeachrow
begin
declareslint;
setsl=new.退貨數量;
updateaset數量=數量-sl;
end//