鬼鬼DH

导航

 
CREATE PROCEDURE sp_person_changepwd
(
@id nvarchar(50),
@oldpwd nvarchar(50),
@newpwd nvarchar(50)
)
 AS
if not exists(select * from person where id=@id and pwd=@oldpwd)
begin
return 0
end
else
begin
update person set pwd=@newpwd where id=@id
return 1
end
posted on 2009-07-16 15:31  鬼鬼DH  阅读(200)  评论(0编辑  收藏  举报