The process of Oracle PL/SQL blocks

Source: Internet
Author: User

1. Introduction

Procedures are used to perform specific operations, when the process is established, you can specify either an input parameter (in) or an output parameter (out), you can pass the data to the execution section by using the input parameters in the process, and by using the output parameters, you can pass the execution part of the data to the application environment, in the sql/ The process is created through the CREATE procedure in plus.

Following through the Scott scenario (The Scott scenario is a scenario that comes with the Oracle database, make sure that the scenario is available, that is, the Scott User is unlocked) to implement a case before implementing the following code:

1.1, write a process, by entering the user name and a new annual salary, to modify the employee's original salary, the code is as follows:

Create procedure varchar2  Number )isbeginupdateset sal=where ename= name; End;

You first create a procedure that specifies the output parameters. Then perform a specific procedure based on the input parameters.

1.2, the implementation process

There are two ways of specifying a procedure

The first type:

OK, revise your annual salary success by using exec execution process!

The second type:

OK, revise your yearly salary by using the call execution process!

Process of Oracle PL/SQL blocks

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.