Im working through sprocs with MySQL and I came across something that made me quite uncertain...
I learned sprocs with MSSQL and I am used to declaring as such:

create ... myProc (@var type, @var2 type(xxx))

and for declares, we declare vars as
declare @var3 type(xxx), @var 4 type() .....

With mysql I have resigned to the missing @ in the proc declaration, and variables are not called via @var...

However, in order to skirt the whole "cant pass a variable into a limit" issue, I basically made a prepared statement inside the proc, and execute it.

However, the declare requires @, where other vars do not require, and in fact seem to error out, when using @ in the declaration.

What am I missing here?



also, why do temp tables persist outside of the sproc? Especially when engine=memory?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.