Package standard, PL-SQL Programming

Package STANDARD

The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available automatically to every PL/SQL program. For illustration, the package STANDARD declares the built-in function below named as the ABS that returns the absolute value of its argument as:

FUNCTION ABS (n NUMBER) RETURN NUMBER;

The contents of the package STANDARD are directly noticeable to the applications. Therefore, you can call the ABS from stored subprograms, database triggers, 3GL applications, and different Oracle tools.

If you re-declare the ABS in a PL/SQL program, your local declaration overrides the global declaration. Though, you can still call the built-in function by using the dot notation, as shown below:

... STANDARD.ABS(x) ...

Most of the built-in functions are overloaded. For illustration, the package STANDARD contains the declarations a shown below:

FUNCTION TO_CHAR (right DATE) RETURN VARCHAR2;

FUNCTION TO_CHAR (left NUMBER) RETURN VARCHAR2;

FUNCTION TO_CHAR (left DATE, right VARCHAR2) RETURN VARCHAR2;

FUNCTION TO_CHAR (left NUMBER, right VARCHAR2) RETURN VARCHAR2;

The PL/SQL solves the call to the TO_CHAR by matching the number and datatypes of the formal and real parameters.

Posted Date: 10/8/2012 1:09:44 AM | Location : United States







Related Discussions:- Package standard, Assignment Help, Ask Question on Package standard, Get Answer, Expert's Help, Package standard Discussions

Write discussion on Package standard
Your posts are moderated
Related Questions
Task 2 [12 marks] Write the package body for the following package specification (the detailed description of each function and procedure is provided in the appendix below). Place

Ending Transactions A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program

Explicit Cursors The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns

query to Find the account numbers of all customers whose balance is more than 10,000 $

DBMS_PIPE: The Package DBMS_PIPE allows various sessions to communicate over the named pipes. (A pipe is a region of memory used by one of the process to pass information to

DBMS_OUTPUT: The Package DBMS_OUTPUT enables you to display output from the PL/SQL subprograms and blocks, that makes it easier to test and debug them. The procedure put_ line

Updating Objects: To change the attributes of objects in an object table, you can use the UPDATE statement, as the illustration below shows: BEGIN UPDATE persons p SET p

Assigning and Comparing Collections One collection can be assigned to other by an SELECT, INSERT, UPDATE, or FETCH statement, an assignment statement, or by a subprogram call. A

Order of Evaluation When you do not use the parentheses to specify the order of evaluation, the operator precedence determine the order. Now compare the expressions below: NOT

Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe