Comments - User-Defined Variables

3 years, 2 months ago Ali masum

SELECT @var:=<expression> FROM...

are executed, @var will always correspond to the value in the last row returned, as you might expect.

i think the sql is exactly the same as mySQL because in mySQL it generates different values according to the row

whereas in mariaDB all rows are filled in with the same value in the last row

so, what is the best solution? anyone can explain it

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.