在phpmyadmin中运行
create procedure p()
bigin
select * from baby_user;
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 'select * from baby_user' at line 3
在mysql 命令提示符中运行以上代码不行刚学习mysql 存储过程 不怎么懂
请大家多多指点!!
谢谢了
create procedure p()
bigin
select * from baby_user;
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 'select * from baby_user' at line 3
在mysql 命令提示符中运行以上代码不行刚学习mysql 存储过程 不怎么懂
请大家多多指点!!
谢谢了
create procedure p()
bigin
select * from baby_user;
end;
//
delimiter //
create procedure p()
begin
select * from baby_user;
end;
//
或如3楼所说,必须使用delimiter。
错误
您的 SQL 查询可能有错。如果可能的话,以下会列出 MySQL 服务器的错误输出,这可能对您解决问题有一定的帮助作用。ERROR: 未知的标点符号字符串 @ 11
STR: //
SQL: delimiter //
create procedure p()
begin
select * from baby_user;SQL 查询: delimiter // create procedure p() begin select * from baby_user; MySQL 返回: #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 'delimiter //
create procedure p()
begin
select * from baby_user' at line 1
我在想是不是我的mysql 里面没有MYSQL.PROC表引起的哦
另外我用的是MYSQL5.0的这个我肯定能用存储过程
支持楼主一下
这一句是正确的,不要选择数据库,否则不正确
CREATE PROCEDURE pp()
BEGIN
SELECT * FROM baby_user;
END$$