在phpmyadmin中创建Sql过程时遇到问题

时间:2019-12-26 05:49:32

标签: sql stored-procedures phpmyadmin

以下是我的SQL过程。我想更新用户的个人资料详细信息。

DELIMITER // 
CREATE PROCEDURE `UserTable_Update`(
IN `Id` INT(11),
IN `Name` VARCHAR(60),
IN `Mobile` INT(15),
IN `Email` VARCHAR(80),
IN `Address` LONGTEXT,
IN `Address2` VARCHAR(200),
IN `Dob` VARCHAR(10),
IN `Prefered` INT(11),
IN `Marriage_status` INT(1),
IN `Marriage_date` VARCHAR(10),
IN PASSWORD VARCHAR(150),
IN Latitude VARCHAR(60),
IN Longitude VARCHAR(60),
IN Latitude2 INT(60),
IN Longitude2 INT(60)
) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER
BEGIN
UPDATE
    USER
SET name= NAME,
    mobile = Mobile,
    email = Email,
    address = Address,
    address2 = Address2,
    dob = Dob,
    prefered = Prefered,
    marriage_status = Marriage_status,
    marriage_date = Marriage_date,
    latitude = Latitude,
    longitude = Longitude,
    latitude2 = Latitude2,
    longitude2 = Longitude2
    WHERE
    user_id = Id
    END //

我遇到以下错误。

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 
server version for the right syntax to use near 'END' at line 37

我在做什么错?我以前从未使用过程序,所以请帮忙

0 个答案:

没有答案