title: User defined function can only have select statements
body: <p>One of the main differences between UDF and SP is that UDF can only have select statements inside it and not insert/update/delete statements. Can someone please explain the reason behind this?The below function:</p>
  
  <pre><code>create function test(..)
  ...
  BEGIN 
  insert into EMPLOYEE('22',12000,'john');
  return 0;
  END
  </code></pre>
  
  <p>is not valid. But why is this so?</p>