1
DELIMITER //

create procedure del()
begin
    declare p_balance decimal(20,4), p_crdr bit, p_debit decimal(20,4), p_credit decimal(20,4);
end //

DELIMITER ;
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' p_crdr bit, p_debit decimal(20,4), p_credit decimal(20,4); end' at line 3

1 Answer 1

4

You can't declare multiple variables in one stamement

DELIMITER //

create procedure del()
begin
    declare p_balance decimal(20,4);
    declare p_crdr bit;
    declare p_debit decimal(20,4);
    declare p_credit decimal(20,4);
end //

DELIMITER ;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.