Oracle tutorial pl/SQL introduction, oracle tutorial plsql

Source: Internet
Author: User

Oracle tutorial pl/SQL introduction, oracle tutorial plsql

This example describes Oracle pl/SQL. We will share this with you for your reference. The details are as follows:

I. What is pl/SQL?

Pl/SQL (procedural language/SQL) is an extension of oracle in the standard SQL language.

Pl/SQL not only allows embedding SQL languages, but also defines variables and constants, allows the use of conditional statements and loop statements, and allows the use of exceptions to handle various errors, which makes its functions more powerful.

Ii. Why pl/SQL?

1. Improve application running performance
2. modular design ideas (paging process, order process, transfer process ..)
3. reduce network transmission volume
4. Improve Security (SQL statements include table names, passwords, and data leakage during transmission. PL/SQL won't)

Iii. Why does Oracle execute quickly in PL/SQL developer and use c # oracleclient to execute slowly?

PL/SQL is used to access Oracle databases in various environments. Since the language is integrated into the database server, PL/SQL code can process data quickly and efficiently.

The c # language is a Microsoft product. It is saved to the "connection pool" when connecting to ORACLE, so it slows down for the first time, but when your Web application is not restarted, in the future, the speed will not be slow.

Iv. disadvantages of pl/SQL

Poor portability (no need to change the database)

V. pl/SQL Comprehension

1) stored procedures, functions, and triggers are written in pl/SQL.
2) stored procedures, functions, and triggers exist in oracle
3) pl/SQL is a very powerful database process language.
4) stored procedures and functions can be called in java

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

1. Create a simple table

CREATE TABLE mytest(
  username VARCHAR2(30),
  pwd VARCHAR2(30)
);

2. creation process (replace: replace if insert_proc exists)

CREATE OR REPLACE PROCEDURE insert_proc IS
BEGIN
  INSERT INTO mytest VALUES('林计钦', '123456');
END;
/

3. How to view the error message: show error;

Note that you must execute

4. How to call this process: exec process name (parameter value 1, parameter value 2 ...);

Eg, exec insert_proc;

Note that you must execute

I hope this article will help you with Oracle database programming.

Articles you may be interested in:
  • Knowledge points for PL/SQL programs in oracle review notes
  • Solution to PL/SQL Dev connection to Oracle dialog box displayed
  • 64-bit win7 pl/SQL cannot connect to oracle Solution
  • Description of if statement in PL/SQL in Oracle
  • Two Methods for modifying tables in Oracle by pl/SQL developer
  • Oracle pl/SQL trigger Programming
  • Oracle 10G: PL/SQL Regular Expressions (regular expressions) Manual
  • How to dynamically change table names in Oracle PL/SQL statements
  • PL/SQL for Oracle Database Task Scheduling
  • Oracle PL/SQL Basics
  • Oracle PL/SQL entry case practices
  • Introduction to Oracle PL/SQL


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.