當前位置:編程學習大全網 - 網站源碼 - mysql的存儲過程怎麽寫

mysql的存儲過程怎麽寫

比如

if exists (select name from sysobjects where name = 'proc_ManagerLogin')

begin

drop procedure proc_ManagerLogin

end

go

create procedure proc_ManagerLogin

@return bit output ,@username varchar(59),@password varchar(32)

as

begin

if exists(select * from systemManager where adminName=@username and adminpass=@password)

begin

set @return=1

--在系統日誌中記錄

exec proc_SystemLog_add '管理員登陸','進入了後臺'

end

else

begin

set @return=0

end

end

go

  • 上一篇:如何獲得《聞道遊記》中的王者稱號
  • 下一篇:馬裏奧賽車ios進不去。
  • copyright 2024編程學習大全網