Saturday, 20 February 2016

SUB PROGRAMS

SUB PROGRAMS:

  •       It is a Part of the Program or self contained block which Perform's a specific Task.
  •       Sub Programs has two names :1)PROCEDURE
                                                                 2)FUNCTION 

                The difference between procedure and function is 
                 PROCEDURE never returns a value.
                 FUNCTION always returns only one value.

       The Main Advantage of sub program is *CODE REUSABILITY
                                                                        *REDUNDANCY OF INSTRUCTIONS
                                                                        *OCCUPIES LESS MEMORY
                                                                        *IMPROVES THE SYSTEM PERFOMANCE
                                                                        *DECREASE THE MAINTAINANCE COST
                                                                        *IMPROVES THE APPLICATION PERFORMANCE
    In PL/SQL whenever we are working with subprograms we need to use the following modes:
     1.IN  mode
     2.OUT mode
     3.INOUT mode 

*IN mode:- It is default mode.It is used for Reading purpose and it accepts the values from the END  user.
*OUT mode:- It is used for writing purpose it sends the values for the end user.
*INOUT mode:-It is used for Reading &^ Writing purpose.It accepts the values from emd user and sends the values to the end user. 

No comments:

Post a Comment

If you Like my blog Spread it and help friends for whom this blog is useful for their career.