Oracle's stored procedure records and other condition optimizations (not yet complete)

Source: Internet
Author: User

Don't want to say much, have written so much, directly on the code. For long periods of unused memory

CREATE OR REPLACE PROCEDURE test_rpocedure is

NUMER1 Numer; --Declaring a numeric type variable

STRING1 VARCHAR2 (50); --Declaring a String type variable

Colume number CONSTANT: = 1; --the constant that declares the directly assigned value

Row_test Table_a%rowtype; --a row data type with a declaration type of table A

Test_cur Curser is SELECT * from Table_b; --Declares the cursor test, which is the data of table B

BEGIN

--Conditional branching:

IF A > 0 Then

B: = 1;

ELSE IF A < 0 Then

UPDATE table_a SET colume_c = ' 2 ';

ELSE

C: = 3;

END IF;

--General for Loop

For D in 1..10 LOOP

BEGIN

E: = D;

END LOOP;

--Loop of the cursor

For Cur_test2 in (SELECT * from Table_q) LOOP

BEGIN

xxxxxx

END LOOP;

END test_rpocedure;

Oracle's stored procedure records and other condition optimizations (not yet complete)

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.