在MySQL中创建存储过程 [英] Create Store Procedure in MySQL

查看:111
本文介绍了在MySQL中创建存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码:



My Code:

CREATE PROCEDURE sp_insertuser(IN units varchar(50)
, IN serials VARCHAR(50)

, IN actives bit(1)
)
BEGIN

INSERT INTO tbldmng (
unit
, serial
, active
)

    VALUES (units
    , serials
    , actives
   );





错误:#1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以便在第17行附近使用正确的语法



请告诉我实际问题在哪里。我不知道。

谢谢。



Error: #1064 - 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 17

Please tell me where is the problem actually. I don't know.
Thank you.

推荐答案

CREATE PROCEDURE sp_insertuser(IN units varchar(50),IN serials VARCHAR(50), INactives bit(1))
BEGIN

INSERT INTO tbldmng (unit, serial, active) VALUES (units , serials , actives );
END //you missed this


这篇关于在MySQL中创建存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆