CRITICAL SKILL 6.8

Create and Use Functions

We may also create stored objects that can be used within a select command. Oracle provides us with functions. There are functions to trim spaces from a field, or replace one character with another. All of these provide us with an ability to extend the capabilities of Oracle itself.

Functions are very much like stored procedures. The main difference is that functions may be used within a select statement in the column list or may also be used in the where clause.

When creating a function, you perform a create or replace function command. You can have variables input to the function, as well as return a value to the calling statement. A function must return a value. The data type of the returned value ...

Get Oracle Database 10g: A Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.