mysql> create procedure pro() begin end;
Query OK, 0 rows affected (0.00 sec)
可以成功执行,begin end 之间什么都没有在里面添加操作语句
mysql> create procedure pro() begin select * from person; end;
ERROR 1064 (42000): 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 'selec
t * from person' at line 1
ERROR 1064 (42000): 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 'end'
at line 1
反正begin 里面填入什么东西都无法执行通过。什么问题啊,纠结。。
mysql> create procedure pro() begin
-> insert into person values(1,'aname',2); end;
ERROR 1064 (42000): 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 'inser
t into person values(1,'aname',2)' at line 2
ERROR 1064 (42000): 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 'end'
at line 1person 表结构: (id int , name varcha(10), age int);
Query OK, 0 rows affected (0.00 sec)
可以成功执行,begin end 之间什么都没有在里面添加操作语句
mysql> create procedure pro() begin select * from person; end;
ERROR 1064 (42000): 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 'selec
t * from person' at line 1
ERROR 1064 (42000): 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 'end'
at line 1
反正begin 里面填入什么东西都无法执行通过。什么问题啊,纠结。。
mysql> create procedure pro() begin
-> insert into person values(1,'aname',2); end;
ERROR 1064 (42000): 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 'inser
t into person values(1,'aname',2)' at line 2
ERROR 1064 (42000): 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 'end'
at line 1person 表结构: (id int , name varcha(10), age int);
解决方案 »
- 天啊!linux 查询视图竟然用了16.40s
- NDB的join的连接操作需要巨大的网络开销,这个何解?
- mysql phpmyadmin如何改变数据库的字符集??
- 有这样的mysql查询吗?高分悬赏
- sql 查询,谁帮我看看。。。
- mysql数据导入sqlserver的中文问题
- Mysql出现下面的错误是怎么回事啊,MySql: ready for connections 041203 14:41:27 MySql: Shutdown Complete
- 如何追踪mysql数据库操作的来源
- 几十、几万、几千万的基础商品数据如何维护和加快查询速度
- MySQL存储过程多表更新请教----隔壁MSSQL转行过来的。
- 关于MYSQL数据库向SQLServer迁移
- postgresql 用pg_restore将备份文件导入到指定的table
create procedure pro() begin select * from person; end//
delimiter ;参考一下手册中的例子。
MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html