I have a question about creating stored procedure in MySql without using delimiter I search a lot in web but i dont find anything usefull for finding my answer. so can we ever dont use delimiter?? if yes, how? I am so happy if anyone can help me here with this question thank you
If the procedure is just a single statement, you don't need to change the delimiter.
CREATE PROCEDURE myProc(param INT)
SELECT col1, col2 FROM someTable WHERE col3 = param;
You only have to change the delimiter if the procedure consists of multiple statements, since ; is the statement terminator in the procedure. If you don't change the delimiter, it will be treated as the terminator of the CREATE PROCEDURE statement itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With