Get the App
SLTechnology News&Howtos  ›  Database  › 

The function and usage of MySQL stored procedure DELIMITER

Shulou Source: shulou.com Published: 2022-06-01 13:23:23 09月21日 Update

Stored procedure is a code segment, in the mysql execution process, encountered the semicolon on the execution, how to change the semicolon, let the code continue to execute, the following talk about the role and usage of the MySQL stored procedure DELIMITER.

1the function of DELIMITER stored procedure MySQL changes the semicolon of the execution statement, which can be changed to DELIMITER / / or DELIMITER $$2. The usage of MySQL stored procedure DELIMITER $/ / defines & & CREATE PROCEDURE GetAllProducts ()

BEGIN

SELECT * FROM products

END $$/ / end $$

DELIMITER; / / change back to the original

The article is from www.huthon.cn.

Tags: Procedure storage semicolon function code article statement Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn NVidia Xiaomi Shulou Tech Info MariaDB