Package standard in pl/sql, PL-SQL Programming

Package STANDARD

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/6/2012 7:43:13 AM | Location : United States







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

Write discussion on Package standard in pl/sql
Your posts are moderated
Related Questions
a. Write an anonymous block that contains a PL/SQL function. Given an order number orderNo, the function will calculate the total number of the parts in the order. Then the anonym

Blocks: The fundamental program unit in the PL/SQL is the block. The PL/SQL block is defined by the keywords BEGIN, DECLARE, EXCEPTION, and END. These keywords partition the b

Restriction and AND - SQL Restriction is available via the WHERE operator, and so it is in SQL. However, by Example showing how a certain simple restriction can be expressed u

Collection Methods:   The collection method is a built-in function or procedure which operates on the collections and is called using the dot notation. The methods like the C

Architecture The PL/SQL run-time system and compilation is a technology, not an independent product. Consider this technology as an engine that compiles and executes the PL/SQL

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

%ISOPEN The %ISOPEN yields TRUE if its cursor or cursor variable is open; or else, the %ISOPEN yields FALSE. In the illustration, you use the %ISOPEN to select an action:

Effects of NULL for union - SQL The treatment of NULL in invocations of EXCEPT is as for UNION. This is different from its treatment in those of NOT IN and quantified compari

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

Write a pl/sql block that declares and uses cursors with parameters. In a loop, use a cursor to retrieve the department number and the department name from the departments table