Developer program
development process
Establishing process create [or replace] procedure procedure_name (argument1 [mode1] dattype1, ...) is [as] PL / SQL block; IS or AS is used to start a PL / SQL block Mode can be in, out, in out, By default is in
When the parameter transfer method is transferred, when the sequence of parameters is selected as the parameter defined, the corresponding variable or numerical name transfer adjustment subroutine is the specified parameter name, and uses associated symbol => to provide corresponding numerical or variable combinations. Use of both
Delete Procedure Drop Procedure Procedure_name;
Development function
Establish function crete [or replace] function function_name (argument1 [mode1] dattype1, ...) Return DataTypeis [AS] PL / SQL block; return specifies the data type of the function return value, the function body contains at least one RETURN statement
Development Package is used to logical combination PL / SQL type (Table type and RECORD type), PL / SQL type (cursor and cursor variable) and PL / SQL subroutines (process and functions). It consists of two parts: Packege Specification and Package Body.
Build package
Establish a package specification package specification for defining a public component (constant, variable, cursor, process, process, function) Create [or repal] package package_nameis | AS public type and item declarations subsplana specificationsend package_name;
Creating an enabled process and functions for implementing packet specification lock definitions Create [or repal] package body package_nameis | as private type and item declarations subsprogram bodiesend package_name;
Adjustable package component - package name. Component name
Purity Level Defines Prgma Restrict_references (Function_Name, Wnds, [WNPS] [, RNDS] [, RNPS]); WNDS - For restriction functions cannot modify database data (forbidden to execute DML) WNPS - for restriction functions You cannot modify the packet variable (cannot be assigned to the packet variable) RNDS - The restriction function cannot read database data (forbidden to execute the SELECT operation) RNPS - The limit function cannot read the package variable (cannot assign the package variable to other variables) )