TOP:BEGIN #Routine body goes here... IF EXISTS ( SELECT * FROM `user` WHERE `name` = in_user_name ) THEN SELECT -1 AS RET; LEAVE TOP; END IF; UPDATE `user` SET `name` = in_user_name WHERE `user_id` = in_user_id; SELECT 0 AS RET; END
if exists里面的sql后面不能加分号;这个也太坑了吧
时间: 2024-10-13 22:24:36