mysql创建存储过程报错,大家看看
PHP中文网
PHP中文网 2017-04-17 13:54:43
0
2
686

CREATE DEFINER = `root`@`%` PROCEDURE `create_account` (
    IN `email` VARCHAR (50),
    IN `password` VARCHAR (50),
    IN `type` TINYINT,
    IN `last_login_ip` VARCHAR (20),
    IN `industry_id` INT,
    IN `company_name` VARCHAR (20),
    IN `company_email` VARCHAR (50),
    IN `telephone` VARCHAR (20),
    IN `address` VARCHAR (50),
    IN `province` VARCHAR (10),
    IN `city` VARCHAR (10),
    IN `district` VARCHAR (10),
    IN `employee_num` VARCHAR (10),
    IN `intro` VARCHAR (100),
    OUT `account_id` INT
)
BEGIN
    SELECT
        id
    FROM
        account
    WHERE
        id = 4;
END;

报错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 24
哪儿的问题,新手,大家勿喷。。。

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
阿神

Remove DEFINER = root@%
That is, CREATE PROCEDURE create_account (
Others remain unchanged

大家讲道理

It feels like your SQL was exported from another application, so this problem is prone to occur. Just use the method above

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template