PL/SQL Parameters   «Prev  Next»

Lesson 1

Using Oracle Parameters

You have already seen some examples of parameters in previous modules in this course. This module examines PL/SQL Stored Object parameters in detail.

Module Objectives

By the end of this module, you will be able to:
  1. Describe the uses of parameters in SQL*Plus and PL/SQL
  2. Use parameters when starting a SQL*Plus script
  3. Describe the ways in which parameters are used in PL/SQL
  4. Place a parameter in a procedure
  5. Use parameters and the RETURN command appropriately
  6. Identify correct syntax for using parameters with cursors
The next lesson shows how to place a parameter in a procedure.

Introduction to SQL*Plus

SQL*Plus is a tool used to enter SQL commands and display the output. It is provided with every Oracle installation, whether on Windows, Unix, or Linux. It is a command line interface and supports editing, user input, and report formatting. In 11g, SQL*Plus for Windows (sqlplusw.exe) is no longer part of the client or database install. The command line version (sqlplus.exe) is still available. You can use an older version of SQL*Plus for Windows to connect to an 11g database, but some functionality may not be supported. SQL Developer, covered in Chapter 2, is a GUI interface that is shipped with 11g and should be considered the replacement for SQL*Plus for Windows. To start SQL*Plus, simply type sqlplus at the command prompt or after starting a DOS command session in Windows. Under normal circumstances, SQL*Plus prompts you for a username and corresponding password. If you are able to provide a valid username/password combination, the SQL> prompt appears on your screen to indicate that you have successfully established a session. You can also start SQL*Plus with the username and password at the command line. In this case, if the username/password are valid, the SQL> prompt will appear. If not, you will be asked to enter a valid username and password.