Oracle Database Operations Daquan (13) pl/SQL programming (stored procedures, functions,

Source: Internet
Author: User
1. stored Procedures, functions, and triggers are all written in plsql. the process, function, and trigger are in the Oracle database. plsql is a very powerful database process Language 4. stored Procedures and functions can be used to call more Oracle Data in Java. video tutorial: 2.taobao.comitem.htm? Id42922011874spm686.1000925.0

1. stored Procedures, functions, and triggers are written in pl/SQL. procedures, functions, and triggers are 3.pl/ SQL statements in Oracle databases, which are very powerful database Process Languages. 4. stored Procedures, functions can be called in Java program more Oracle data, video tutorial: http://2.taobao.com/item.htm? Id = 42922011874spm = 686.1000925.0

1. Stored Procedures, functions, and triggers are all written in pl/SQL.

2. The process, function, and trigger are in the Oracle database.

3. pl/SQL is a very powerful database process Language

4. stored procedures and functions can be called in Java programs.

More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =


Pl/SQL concepts:


Benefits:


Disadvantages:

Poor pl/SQL portability

Modular Design Concept: (Instance) Paging process, order process, transfer process ......


More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =


Sqlplus Programming

Instance:

1. Write a stored procedure that can add records to a table

Create procedure sp_pro1 is // name of the stored procedure

Begin

-- Execution part

Insert into mytest values ('zhang san', '201312'); // table name

End;


Note: how to view error information,

Write: show error;

How to call this process:

1): exec process name (parameter value 1, parameter value 2 ......);

For example, the above process is called: exec sp_pro1;

2 ):


Write SQL/Developer:

Create procedure sp_pro2 is

Begin

-- Execution part

Delete from mytest where name = 'zhangsan ';

End;

Introduction:


More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =




Pl/SQL block:



More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =


Pl/SQL block instances:


Set serveroutput off -- disable the output option



More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =


Expansion:




More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =



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.