procedure vs function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdusumalliGopikumar
    New Member
    • Aug 2007
    • 42

    procedure vs function

    Hello,

    We can return the value by using a procedure using out parameter then what is the use to go for functions in pl/sql?
  • gintsp
    New Member
    • Aug 2007
    • 36

    #2
    One cannot use procedures in DML statements, however user defined functions can be used.
    However usually user defined function usage makes the statements slower and therefore one should understand why he/she really uses them.

    Gints Plivna

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Originally posted by AdusumalliGopik umar
      Hello,

      We can return the value by using a procedure using out parameter then what is the use to go for functions in pl/sql?
      Procedures are not designed to return values ,though you can do that by using OUT parameter.To return value u should use functions and to implement some other logic use Procedure.

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        How ever you cannot call a function in SELECT statement if its return type is BOOLEAN.

        Comment

        Working...