双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

一个很简单的存储过程,大家帮我看看错在哪里了

lczddd lczddd 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
create PROCEDURE lczUpdateMyFriends(
$MyId MEDIUMINT,
$MyFriendId MEDIUMINT,
$GroupName VARCHAR(200),
$OType VARCHAR(200)/*add--add friend, DEL-delete friend,move-move to another group*/
)
BEGIN
IF ($OType='add') then
BEGIN
insert t_friendlist VALUES($MyId,$MyFriendId,$GroupName);
END;
ELSE
BEGIN
IF ($OType='del') then
BEGIN
delete from t_friendlist where f_id=$MyId and iadd=$MyFriendId;
END;
ELSE
BEGIN
IF ($OType='mov') then
update t_friendlist set groupName=$groupName where f_id=$MyId and iadd=$MyFriendId;
End if;
END;
END IF;
END;
END /////26行

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 26
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
lczddd
MySQL 57,062 成员 56,759 内容