我是 mysql 新手,我不明白为什么在创建存储过程时会出错。
DELIMITER |
CREATE PROCEDURE lastscan(IN task_id_var INT)
BEGIN
SELECT COUNT(*) FROM debugger WHERE task_id=task_id_var INTO @total|
SET @total=@total+1|
INSERT INTO debugger SET scan_num=@total, task_id=task_id_var|
END|
DELIMITER;
我得到:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
我也不明白,为什么我需要使用那个分隔符语法..?分隔符 | 然后再次DELIMITER;...它的功能是什么