Home > Database > Mysql Tutorial > MySQL存储函数错误[Err]1064的调试记录_MySQL

MySQL存储函数错误[Err]1064的调试记录_MySQL

WBOY
Release: 2016-06-01 13:02:10
Original
1482 people have browsed it

一,朋友创建存储函数报错。

CREATE DEFINER=`root`@`localhost` FUNCTION `stuff`(

二、查看创建函数的功能是否开启:

先看下,log_bin_trust_function_creators有没有开启

三,分析

mysql存储函数,需要特殊的间隔符来区分,还要用DELIMITER来标示,还有select ... into ... 已经赋值了,set就是多余的,所以修改如下:

四,执行如下,都OK。

mysql> use test;

PS:mysql的存储函数或者存储过程么有直接可以调试的工具,所以需要手工仔细分析查看,应用中尽量少用存储过程或者存储函数。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template