/*SP7*/
CREATEPROCEDUREdbo.getUserInfo
@useridint,
@checkloginbit
as
setnocounton
begin
if@useridisnullor@checkloginisnullreturn
selectusername
fromdbo.[usrinfo]
whereuserid=@userid
--若为登任命户,取usertel及usermail
if@checklogin=1
selectusertel,usermail
fromdbo.[userinfo]
whereuserid=@userid
return
end
go