Variable never got updated with query, and always have default values
BEGIN
DECLARE sP INT DEFAULT 1;
DECLARE cBB INT DEFAULT 0;
SELECT sprice, cb INTO sP, cBB FROM item WHERE id = 2;
END
Need a little guidance here for whats wrong with it (MySQL version 5.5.20)
SELECT sP AS sprice, cB AS cb FROM item WHERE id = 2;directly? Why do you need this variables inside this procedure?INTO @varnamebut some issue with the above mentioned way