Database Tutorial

Course Tutorial Site

Site Admin

Stored Programs

without comments

Oracle introduced the PL/SQL programming language more than 20 years ago in the Oracle 6 database. PL/SQL provides a procedural extension to SQL and lets you call SQL from a PL/SQL program, or vice versa. This blog page introduces you to the basics of writing stored programs in Oracle 11g and provides a summary overview of PL/SQL. You can find more complete treatment in Oracle Database 11g PL/SQL Programming.

The concept of transactional SQL units delivered by INSERT, UPDATE, and DELETE statements and be combined with PL/SQL blocks and Transactional Control Language (TCL) let you write powerful database-centric programs.

In this blog page, you’ll learn the basics of writing PL/SQL programs. The chapter covers the following topics:

  • Blocks
  • Variables
  • Control structures
  • Exception handling

As you read through these sections, remember that PL/SQL is a strongly typed language. Strongly typed languages constrain how you assign or compare values of different data types. PL/SQL borrows its block syntax from the Ada and Pascal programming languages. It’s a natural fit with SQL.

The PL/SQL assignment operator (:=) makes writing PL/SQL assignments straightforward. It also eliminates any confusion between the assignment operator and comparison operator (=) in PL/SQL.

Anonymous Blocks

Named Blocks

Variables

Control Structures

Exception Handling

Written by michaelmclaughlin

August 13th, 2018 at 11:48 pm

Posted in