sql代码:
delimiter //
create function fun_proId($detailInvNO Varchar(20),$detailTypeCode Varchar(20), $detailInvKind char(1), $detailInvMachineNo varchar(10))
returns  int 
begin
  declare $proId int;
   select $proId = id from InvInfos where invNO = $detailInvNO and invTypeCode = $detailTypeCode
      and invKind = $detailInvKind and invMachineNo = $detailInvMachineNo;
  if ISNULL($proId) then
       set $proId = 0;
  end if;
  return $proId;
end;//
delimiter ;报错信息:
Error Code : 1415
Not allowed to return a result set from a function
(0 ms taken)
谢谢! 我今天第一次用mysql   帮帮忙啊!