Let's first create a stored procedure. Following is the query to create a stored procedure using MySQL Workbench.
use business; DELIMITER // DROP PROCEDURE IF EXISTS SP_GETMESSAGE; CREATE PROCEDURE SP_GETMESSAGE() BEGIN DECLARE MESSAGE VARCHAR(100); SET MESSAGE="HELLO"; SELECT CONCAT(MESSAGE,' ','MYSQL!!!!'); END // DELIMITER ;
This is the screenshot of the stored procedure in MySQL workbench-
You need to execute the above stored procedure with the help of the following symbols shown in the screenshot-
Now you can execute the above statement again with the help of the symbols shown above. This will produce the following output -
The above is the detailed content of Create a stored procedure using MySQL Workbench?. For more information, please follow other related articles on the PHP Chinese website!