Home  >  Article  >  Database  >  MySQL5.5存储过程支持limit变量_MySQL

MySQL5.5存储过程支持limit变量_MySQL

WBOY
WBOYOriginal
2016-06-01 13:35:01906browse

bitsCN.com

MySQL5.5存储过程支持limit变量

在审核开发的SQL时,发现有个存储过程他们是用动态SQL(CONCAT()函数)拼凑的,这样性能没有静态SQL好,于是让他们更改,结果他们说创建存储过程报错,我很纳闷,不应该啊,我这边没问题,结果咨询了那边,测试环境是用的MySQL5.1,而我这边是MySQL5.5,版本的问题。

下面我做了一个测试,这个是MySQL5.1的,如图:
MySQL5.5存储过程支持limit变量_MySQL

创建果然报错,再来看看MySQL5.5的表现,如图:

MySQL5.5存储过程支持limit变量_MySQL

完全OK,一切顺利。


bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn