日期:2014-05-16  浏览次数:20907 次

请求各位朋友帮我看看这个MYSQL5.1的存储过程错在哪?
CREATE PROCEDURE login (in uname varchar(30),in upwd varchar(60), out re_uid int, out re_unetname varchar(30))
BEGIN
select top 1 @re_uid=user_id,@re_unetname=user_netname form glcity_user where user_name=uname AND user_pwd=upwd AND user_state=1;
END;

没分了,所以给不了分.

------解决方案--------------------
SQL code
CREATE PROCEDURE login (in uname varchar(30),in upwd varchar(60), out re_uid int, out re_unetname varchar(30))
BEGIN
    select re_uid:=user_id,re_unetname:=user_netname form glcity_user where user_name=uname AND user_pwd=upwd AND user_state=1 limit 1;
END;