title: want to write a query to find a tax in oracle.i had written it but it's not working plss check it and help me out
body: <p>i had written a code to find the tax but its now working for the income above 10 lac plss help me out`enter code here</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION tax_func (p_sal IN NUMBER)
     RETURN NUMBER
  IS
     tax      NUMBER := 0;
     v_tsal   NUMBER := 0;
     v_sal    NUMBER;
  BEGIN
     v_sal := p_sal * 12;
     IF v_sal &gt; 1000000
     THEN
        v_tsal := v_sal - 1000000;
        tax := (v_sal * 0.3);
        v_sal := v_sal - v_tsal;
     END IF;
     IF v_sal &gt; 500000
     THEN
        v_tsal := v_sal - 500000;
        tax := (v_sal * 0.2);
        v_sal := v_sal - v_tsal;
     END IF;
     IF v_sal &gt; 200000
     THEN
        v_tsal := v_sal - 200000;
        tax := tax + (v_sal * 0.1);
     END IF;
     RETURN tax;
  END;
  /
  </code></pre>