1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

PL/SQL Procedures AND Functions

Discussion in 'SQL PL/SQL' started by arivazhagan, Mar 4, 2011.

  1. arivazhagan

    arivazhagan Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    75
    In what situation will I use procedures AND functions
     
  2. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
  3. ora

    ora Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Dear Arivazhagan,
    Procedure can be used to perform some actions (say DML) on the database.(Means you don't want to return any information from the database, though the return type is not must).
    Procedure can return values using OUT/ IN OUT parameters.
    Function can be used to compute values. (say getting count/sum/ of the values from the database tables and it must have a return type).

    Regards,
    Oracle Learner
     
  4. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    And when you want to use it SQL statement (obviously, returning one value) , use Functions.