3 Replies Latest reply: Nov 5, 2012 12:29 AM by yoonas RSS

    Can i use "return" in stored procedure?

    970843
      CREATE PROCEDURE Pname(in_Tid IN VARCHAR2,in_IP IN VARCHAR2,outstaticip OUT VARCHAR2,outcount OUT NUMBER)
      AS
      BEGIN
      select STATIC_IP into outstaticip from OP_TTER_MAPPING where TERMINAL_ID = in_Tid;
      if in_IP = outstaticip then
      return 1;
      else
      select COUNT(*) into outcount from OP_TTER_MAPPING where DYNAMIC_IP_LOW <= in_IP AND DYNAMIC_IP_HIGH >= in_IP AND TERMINAL_ID = in_Tid;
      if outcount = 1 then
      return 1;
      else
      return 0;
      end if;
      end if;
      END;

      1.Can i use return like above if stored procedure?
      2.If we can use return, how can i get that return value in Executesql("begin Pname(----)END") method