Oracle -- plsql Stored Procedure

Source: Internet
Author: User

Subroutine introduction:

•NamedPL/SQLBlock,Acceptable parameters,Can be called. •Subroutine type

Process:Used to perform an operation

Function:Used to execute an operation and return values

•Standard-basedPL/SQLBlock Structure

Declaration

Executable part

Exception section (optional)


Advantages:

-Modular

Program decomposition into multiple logic modules

-Reusability

After a subroutine is executed,Stored in Database,Can be in any number

Used in applications

-Maintainability

Subroutine simplifies Maintenance

-Improve Performance

The user directly uses the parsed program in the Shared Pool


Stored Procedure:

• Named PL/SQL Block • Acceptable parameters • Can be called repeatedly • Used to perform an operation • Stored in the database


Formal parameters and actual parameters

Formal parameters: variables declared in the parameter list of the subroutine description

CREATEPROCEDURE raise_sal (

P_idNUMBER, p_amount NUMBER)

...

ENDraise_sal;

•Actual parameters:Variable or expression referenced in the parameter list called by the subroutine

Raise_sal (v_id, 2000)



Create a process with Parameters

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.