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
JOIN and AND in SQL In this Section is all about one operator, JOIN. SQL's closest counterpart, NATURAL JOIN, has already been covered. Here we look at several other "join" op

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Disjunction (OR, ∨) Again we have nine rows instead of just four and again, when unknown is not involved, the rows are as for 2VL. Also, when anything is paired with true, t

Project Description: This is stage 1 of a larger conversion project. We are converting a traditional Server/Client application written in Access 2007 into a web interface with S


%ROWTYPE: This attribute gives a record type which represents a row in the database table or a row fetched from a formerly declared cursor. The Fields in the record and corresp

Name Resolution In potentially uncertain SQL statements, the names of the database columns take precedence over the names of the local variables and formal parameters. For e.g.

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

MAX and MIN operator in SQL Example: (SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') (SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') Example