background image
<< Creating a Function with GUI Menu | Modifying Procedures and Functions >>
<< Creating a Function with GUI Menu | Modifying Procedures and Functions >>

Entering the Function Code

Creating and Using Standalone Procedures and Functions
4-6 Oracle Database 2 Day Developer's Guide
4.
The
calculate_score
pane opens with the following code.
Note that the tile of the pane is in italic font, which indicates that the procedure is
not saved in the database.
CREATE OR REPLACE
FUNCTION calculate_score
( cat IN VARCHAR2
, score IN NUMBER
, weight IN NUMBER
) RETURN NUMBER AS
BEGIN
RETURN NULL;
END calculate_score;
5.
From the File menu, select Save to save the new function. Alternatively, use the
CTRL + S
key combination.
Note that Oracle Database automatically compiles functions prior to saving them.
Note that the tile of the
calculate_score
pane is in regular font, not italic; this
indicates that the procedure is saved to the database
See Also:
Oracle Database SQL Language Reference for information on the
CREATE PROCEDURE
statement
Oracle Database SQL Language Reference for information about the
CREATE FUNCTION
statement