title: Is it possible to use "return" in stored procedure?
body: <pre><code> 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 &lt;= in_IP AND   DYNAMIC_IP_HIGH &gt;= in_IP AND TERMINAL_ID = in_Tid;
   if outcount = 1 then
   return 1;
   else
   return 0;
    end if;
   end if;
   END;
  </code></pre>
  
  <ol>
  <li>Is it possible to use return in stored procedure like above? </li>
  <li>If we can use return, how can i get that return value in <code>Executesql("begin Pname(----)END")</code> method </li>
  </ol>
  
  <p><strong>EDIT</strong></p>
  
  <p>Now I edited my return value in stored procedure like this, am I doing it right ?</p>
  
  <pre><code>CREATE PROCEDURE P_ValidateTIDIP(in_Tid IN VARCHAR2,in_IP IN VARCHAR2,outstaticip OUT VARCHAR2,outcount OUT NUMBER,outretvalue OUT NUMBER)
  AS
  BEGIN
  select STATIC_IP into outstaticip from OP_TTER_MAPPING where TERMINAL_ID = in_Tid;
  if in_IP = outstaticip then
      outretvalue:=1;
  else 
      select COUNT(*) into outcount from OP_TTER_MAPPING where DYNAMIC_IP_LOW &lt;= in_IP AND DYNAMIC_IP_HIGH &gt;= in_IP AND TERMINAL_ID = in_Tid;
      if outcount = 1 then 
       outretvalue:=1;
      else
       outretvalue:=0;
     end if;
  end if;
  END;
  </code></pre>