SQL Command to Change Delimiter
The command used to change the delimiter in SQL is 'delimiter'.
The 'delimiter' command is used to specify a different character or sequence of characters to be used as the delimiter for SQL statements. This is useful when you need to use a different delimiter than the default one (usually ';'), for example, when you are defining stored procedures or functions.
Here is an example of how to use the 'delimiter' command:
DELIMITER //
CREATE PROCEDURE my_procedure()
BEGIN
SELECT * FROM my_table;
END //
DELIMITER ;
In this example, we change the delimiter to '//' for the duration of the procedure definition. This allows us to use ';' inside the procedure definition without it being interpreted as the statement terminator.

原文地址: http://www.cveoy.top/t/topic/oCl1 著作权归作者所有。请勿转载和采集!