2 Replies Latest reply: Apr 9, 2013 6:38 AM by François Degrelle RSS

    funcionality of procedures and functions

    salute-Salem
      hi all ,
      i do not see a diff between using a procedure or function , because the return statement is the same as the dbms......

      what is the difference between :
      create procedure hh is 
      n number;  
      begin 
      select sal into n from emp where ename = 'SMITH' ; 
      dbms_output.put_line(n) ; 
      end ; 
      and
      create function hh return number is 
      n number ; 
      begin 
      select sal into n from emp where ename = 'SMITH' ; 
      return n ; 
      end ; 
      it is the same , then why pro and func ?
      what things can i do with pro , and i can not with func , or vice versa ?

      thanks