Plsql 简明教程

PL/SQL - Overview

PL/SQL 编程语言是由 Oracle 公司在 20 世纪 80 年代末作为 SQL 和 Oracle 关系数据库的程序扩展语言开发的。以下是关于 PL/SQL 的一些重要事实 -

The PL/SQL programming language was developed by Oracle Corporation in the late 1980s as procedural extension language for SQL and the Oracle relational database. Following are certain notable facts about PL/SQL −

  1. PL/SQL is a completely portable, high-performance transaction-processing language.

  2. PL/SQL provides a built-in, interpreted and OS independent programming environment.

  3. PL/SQL can also directly be called from the command-line SQL*Plus interface.

  4. Direct call can also be made from external programming language calls to database.

  5. PL/SQL’s general syntax is based on that of ADA and Pascal programming language.

  6. Apart from Oracle, PL/SQL is available in TimesTen in-memory database and IBM DB2.

Features of PL/SQL

PL/SQL 具有以下特性 -

PL/SQL has the following features −

  1. PL/SQL is tightly integrated with SQL.

  2. It offers extensive error checking.

  3. It offers numerous data types.

  4. It offers a variety of programming structures.

  5. It supports structured programming through functions and procedures.

  6. It supports object-oriented programming.

  7. It supports the development of web applications and server pages.

Advantages of PL/SQL

PL/SQL 具有以下优点 -

PL/SQL has the following advantages −

  1. SQL is the standard database language and PL/SQL is strongly integrated with SQL. PL/SQL supports both static and dynamic SQL. Static SQL supports DML operations and transaction control from PL/SQL block. In Dynamic SQL, SQL allows embedding DDL statements in PL/SQL blocks.

  2. PL/SQL allows sending an entire block of statements to the database at one time. This reduces network traffic and provides high performance for the applications.

  3. PL/SQL gives high productivity to programmers as it can query, transform, and update data in a database.

  4. PL/SQL saves time on design and debugging by strong features, such as exception handling, encapsulation, data hiding, and object-oriented data types.

  5. Applications written in PL/SQL are fully portable.

  6. PL/SQL provides high security level.

  7. PL/SQL provides access to predefined SQL packages.

  8. PL/SQL provides support for Object-Oriented Programming.

  9. PL/SQL provides support for developing Web Applications and Server Pages.