createtable TSTUSERS ( UserName varchar(50) primarykey, PassWords varchar(50) notnull ) GO insertinto TSTUSERS values('test','test') GO CREATEproc pr_login @UserNamevarchar(50), --UserName @PassWordsvarchar(50), --PassWord @resultvarchar(50) output --Result as select*from TSTUSERS where UserName=@UserName if(@@rowcount<1) begin set@result='UserName Error' end else begin select*from TSTUSERS where (UserName=@UserName)and(PassWords=@PassWords) if(@@rowcount<1) begin set@result='PassWord Error' end else begin set@result='ACCESS' end end return
posted on
2007-10-18 14:20wkjs
阅读(207)
评论(0)
编辑收藏举报