This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-16. For the latest, interactive version please visit https://mariadb.com/kb/.

loop parameter

i am new migrate from mySQL in visual studio

when i set parameter in SELECT statement

SELECT @sp:= Sum(dt.a) AS spk, @tby:=Sum(dt.b) AS tabs, IF(@sp = 0, 0, @tbyr / @sp) AS px, @py:=Sum(dt.vt) AS py, @bbt:=py*py-px AS bBt

this result is null in column px and bbt, but running well when using mySQL

what must i do

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.