title: Functions vs procedures in Oracle
body: <p>can anybody explain what is the main difference between functions and procedures in Oracle? Why must I use procedures if I can do everything with functions? </p>
  
  <ol>
  <li>If I cannot call procedure in sql statement, ok, I'll write a function to do the same work.</li>
  <li>Procedures don't return values, ok, I'll return only sql%rowcount or 1(success), 0(exception) after any dml operation</li>
  <li>Both procedures and functions can pass variables to calling environment via OUT/IN OUT parameters</li>
  </ol>
  
  <p>I heard that the main difference is in performance, 'procedures are faster than functions'. But without any detail. </p>
  
  <p>Thanks in advance.</p>