title: Creating ORACLE PL/SQL store procedures with different kind of AND conditions
body: <p>I need to create a Oracle query for example</p>
  
  <pre><code>select * from emp where emp_id=i_emp_id and emp_nm=i_emp_nm and emp_dpt=i_emp_dpt
  </code></pre>
  
  <p>if all the three inputs are not null it should function like</p>
  
  <pre><code>select * from emp where emp_id=i_emp_id and emp_nm=i_emp_nm and emp_dpt=i_emp_dpt
  </code></pre>
  
  <p>if i pass i_emp_id as null then the query should function like</p>
  
  <pre><code>select * from emp where emp_nm=i_emp_nm and emp_dpt=i_emp_dpt
  </code></pre>
  
  <p>if i pass i_emp_id as null and i_emp_dpt as null then the query should function like </p>
  
  <pre><code>select * from emp where emp_nm=i_emp_nm
  </code></pre>