title: How can I test a function working or not in pl-sql?
body: <p>I learned the basics of writing a function and procedure in pl-sql but I don't know how to test if it's working , and if not How can I debug it .
  Any Ideas please .
  thanks all. 
   Here is the function I'm trying to test it </p>
  
  <pre><code>CREATE OR REPLACE FUNCTION MIN_MAX_SAL RETURN NUMBER AS 
  cursor emp_cur is select salary from employees ;
  emp_sal number;
  min_sal jobs.min_salary%type;
  max_sal jobs.max_salary%type;
  BEGIN
  select min_salary , max_salary into min_sal , max_sal from jobs;
  for emp_sal in emp_cur loop
  if (emp_sal &gt; max_sal or emp_sal &lt; min_sal) then
  return 0;
  end loop;
  RETURN 1;
  END MIN_MAX_SAL;
  </code></pre>
  
  <p>Any help ?</p>