Skip Headers

Oracle9i SQL Reference
Release 2 (9.2)

Part Number A96540-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

SQL Statements: ALTER TRIGGER to COMMIT , 9 of 11


CALL

Purpose

Use the CALL statement to execute a routine (a standalone procedure or function, or a procedure or function defined within a type or package) from within SQL.

See Also:

PL/SQL User's Guide and Reference for information on creating such routine

Prerequisites

You must have EXECUTE privilege on the standalone routine or on the type or package in which the routine is defined.

Syntax

call::=

Text description of statements_419.gif follows
Text description of call


Keywords and Parameters

schema

Specify the schema in which the standalone routine (or the package or type containing the routine) resides. If you do not specify schema, then Oracle assumes the routine is in your own schema.

type or package

Specify the type or package in which the routine is defined.

function | procedure | method

Specify the name of the function or procedure being called, or a synonym that translates to a function or procedure.

When you call a type's member function or procedure, if the first argument (SELF) is a null IN OUT argument, then Oracle returns an error. If SELF is a null IN argument, then Oracle returns null. In both cases, the function or procedure is not invoked.

Restriction on functions: If the routine is a function, then the INTO clause is mandatory.

@dblink

In a distributed database system, specify the name of the database containing the standalone routine (or the package or function containing the routine). If you omit dblink, then Oracle looks in your local database.

expr

Specify one or more arguments to the routine, if the routine takes arguments.

Restrictions on arguments to the routine:

INTO :host_variable

The INTO clause applies only to calls to functions. Specify which host variable will store the return value of the function.

:indicator_variable

Specify the value or condition of the host variable.

See Also:

Pro*C/C++ Precompiler Programmer's Guide for more information on host variables and indicator variables

Example

Calling a Procedure: Example

The following statement uses the remove_dept procedure (created in "Creating a Package Body: Example") to remove the Entertainment department (created in "Inserting Sequence Values: Example"):

CALL remove_dept(280); 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback