Creating a procedure doesn't work in MySQL

Viewed 27

I tried plenty of codes but this does not seem to work, I'm using VScode, does it has something to do with it ?. Either way here are all the codes I've tried:

CREATE procedure testProcedure()
BEGIN 
    SELECT * FROM order_id
END;
DELIMITER $$
CREATE procedure testProcedure()
BEGIN 
    SELECT * FROM order_id
END
DELIMITER $$
CREATE procedure testProcedure()
AS
    SELECT * FROM order_id
GO;

All of them would throw a syntax error at the DELIMTER $$, BEGIN, or AS

If I omit the parenthesis in testProcedure in the BEGIN ... END , it will throw this error:

enter image description here

Here's the version of MySQL:

enter image description here

*To mods: this is not a duplicate as I searched and tried pretty much everything but they did not work for me, thanks.

0 Answers
Related