Oracle PL/SQL Programming, 2nd Edition

Oracle PL/SQL Programming, 2nd EditionSearch this book
Previous: 17.2 Syntax for Calling Stored Functions in SQLChapter 17
Calling PL/SQL Functions in SQL
Next: 17.4 Restrictions on PL/SQL Functions in SQL
 

17.3 Requirements for Stored Functions in SQL

There are several requirements a programmer-defined PL/SQL function must meet in order to be callable from within a SQL statement:

All of the following function specifications would be rejected if used within a SQL statement:

/* SQL doesn't know about PL/SQL tables. */
TYPE string_tabtype IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
FUNCTION temp_table RETURN string_tabtype;

/* SQL doesn't know about Booleans. */
FUNCTION call_is_open (call_id_in IN call.call_id%TYPE) RETURN BOOLEAN;

FUNCTION calc_sales
   (company_id_in IN NUMBER, use_closed_orders_in IN BOOLEAN)
RETURN NUMBER;


Previous: 17.2 Syntax for Calling Stored Functions in SQLOracle PL/SQL Programming, 2nd EditionNext: 17.4 Restrictions on PL/SQL Functions in SQL
17.2 Syntax for Calling Stored Functions in SQLBook Index17.4 Restrictions on PL/SQL Functions in SQL

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference