MySQL Forums
Forum List  »  Newbie

Store Sum to a memory variable
Posted by: Michael Smith
Date: July 11, 2023 10:28AM

I am attempting to store the Sum of Taxes to a memory variable with the code below:

SELECT SUM(TOTTAX) AS mSumTaxes FROM Invoices02 group by Invnbr;

But when I try to use the variable 'mSumTaxes' later in the code block, MySql does not accept it.

How do I do this?


Options: ReplyQuote

Written By
Store Sum to a memory variable
July 11, 2023 10:28AM

Sorry, only registered users may post in this forum.

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.