我正在尝试使用MySQLVersion5.6.11创建存储过程,但它显示了一些错误,这是我的代码。
CREATE PROCEDURE Debug(Message TEXT)
BEGIN
CREATE TABLE IF NOT EXISTS _debug (
id int(10) unsigned NOT NULL auto_increment,
msg TEXT DEFAULT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
INSERT INTO _debug(`msg`) VALUES(Message);
END; 我得到了这个错误:
#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 8
发布于 2014-03-13 13:08:59
移除;
delmiter $$
CREATE PROCEDURE Debug(Message TEXT)
BEGIN
CREATE TABLE IF NOT EXISTS _debug (
id int(10) unsigned NOT NULL auto_increment,
msg TEXT DEFAULT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id))
INSERT INTO _debug(`msg`) VALUES(Message)
END$$https://stackoverflow.com/questions/22379443
复制相似问题