I am facing a strange behavior.
SELECT INTO and SET Both works for some variables and not for others. Event syntaxes are the same
SET @Invoice_UserId := (SELECT UserId FROM invoice WHERE InvoiceId = @Invoice_Id LIMIT 1); -- Working
SET @myamount := (SELECT amount FROM invoice WHERE InvoiceId = @Invoice_Id LIMIT 1); - Not working
SELECT Amount INTO @myamount FROM invoice WHERE InvoiceId = 29 LIMIT 1; - Not working
If I run these queries directly then works, but not working in stored procedure.