les08 func cre tellme1





Creating Functions










The interactions in this eCourse require Javascript to be enabled.



 

Creating Functions: Part 1


previous|next





CREATE FUNCTION Statement
A function is a named PL/SQL block that can accept parameters, be invoked, and return a value. In general, you use a function to compute a value. You create new functions with the CREATE FUNCTION statement, which may declare a list of parameters and must define the actions to be performed by the standard PL/SQL block.
Functions and procedures are structured alike.
A function must return a value to the calling environment, whereas a procedure returns zero or
more values to its calling environment through OUT parameters. Like a procedure, a function has a header, a declarative
section, an executable section, and an optional exception-handling section. A function must have
a RETURN clause in the header and at least one RETURN statement in the executable section.
Syntax



CREATE [OR REPLACE] FUNCTION function_name [(parameter1 [mode1] datatype1,
parameter2 [mode] datatype2, ...)]RETURN datatype
IS|AS [local_variable_declarations; …]BEGIN -- actions; RETURN expression;END [function_name];



 
 
 
 
 








Wyszukiwarka

Podobne podstrony:
les08 func cre tellme2
les08 proc cre tellme2
les08 func cre showme
les08 proc cre tellme1
les08 man triggers tellme
les08 proc cre showme
les08 pack spec tellme
les08 audit trigger1 tellme
les08 pack body tellme
les08 proc cre whylearnit
les08 cre block1 tellme
les08 cre block2 tellme
les08 cre anonymous1 tellme
les08 cre triggers tellme
les08 cre dmltriggers1 tellme
les08 pack tellme1
les08 cre anonymous2 showme
les08 except tellme1
les08 cre dmltriggers2 showme

więcej podobnych podstron