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

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级讲师

membalas semua(2)
阿神

去掉DEFINER = root@%
即CREATE PROCEDURE create_account (
其他的不变

大家讲道理

感觉你这sql应该是用别的应用导出来的,就容易出现这种问题。用楼上的方法即可

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan