日期:2014-05-17  浏览次数:20697 次

oracle创建存储过程
创建一个存储过程根据账号和密码验证数据库是否有这个用户,怎么写

------解决方案--------------------
create proc checkUser
@uname varchar(50),
@pwd varchar(50),
@flag int output
as
declare @temppwd varchar(50)
select @temppwd=[password] from pH_BBS_User where username=@uname
if @temppwd is null
set @flag=1
else if @temppwd=@pwd
set @flag=2
else
set @flag=3