IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_update_employeepassword]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_update_employeepassword]
GO
-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>
-- Description:<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[mps_update_employeepassword]
@userid int,
@oldpass nvarchar(32),
@newpass nvarchar(32)
AS
BEGIN
SET NOCOUNT ON;
update mps_login 
setcu_pass=@newpass
where cu_pass=@oldpass 
and cu_objid=@userid and cu_type=0
if @@ROWCOUNT = 1
select 1 as result,'修改成功' as msg
else
select 0 as reuslt,'提供的旧密码不正确' as msg
END