Re: Please help debug mysql insert query
Insert and Update don't combine, they're separate commands, and SUM() aggregates across rows ... I think you mean something like ...
[code[
insert into it.debt
set debt_id0,debt_total=2500, debt_payment=150, debt_payment_date=now();
update it_debt
set total paid=total_paid+150, debt_total_remaining=debt_remaining-150
where debt_id=0;
[/code]
Subject
Written By
Posted
September 20, 2021 05:26AM
Re: Please help debug mysql insert query
September 20, 2021 10:13AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.