PL/SQL Datatypes  «Prev  Next»
Lesson 1

Working with PL/SQL Datatypes

In any programming language, you need datatypes to be able to manipulate data quickly. PL/SQL provides a variety of datatypes to help you store values.
In this module, we will first take a look at the composition of a PL/SQL block. Then, you will learn about the rules for using a nested block.
You will also learn about identifiers and literals that will help you build program logic. Next, we will review the different conversion functions that let you convert datatypes. You will also learn the use of operators in PL/SQL.
This will provide you with the knowledge necessary to help build and execute your first PL/SQL block. In this process, we will also review the different ways to comment code.

Module Objectives

By the end of this module, you will know how to:
  1. Describe the basic structure of a PL/SQL block
  2. Define the scope of variables within nested blocks
  3. Place identifiers and use literals within a PL/SQL block
  4. Add comments to a PL/SQL block
  5. Identify implicit and explicit datatype conversions within PL/SQL
  6. Use operators within PL/SQL
In the next lesson, the basic structure of a PL/SQL block we will bed described.

Main Features of PL/SQL

PL/SQL combines the data-manipulating power of SQL with the processing power of procedural languages. When you can solve a problem with SQL, you can issue SQL statements from your PL/SQL program, without learning new APIs. Like other procedural programming languages, PL/SQL lets you declare constants and variables, control program flow, define subprograms, and trap runtime errors. You can break complex problems into easily understandable subprograms, which you can reuse in multiple applications.