mysql if exist坑
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后面不能加分号;这个也太坑了吧