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
Error Handling The PL/SQL makes it easy to detect and process the predefined and user-defined error conditions known as exceptions. Whenever an error occurs, an exception is ra

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Use of Table Comparisons - SQL Table comparisons where it is noted that although table expressions cannot be compared, we have TABLE (t) to convert a table expression t into

Data Types in SQL - Integer INTEGER or  synonymously INT, for integers within a certain range. SQL additionally has types SMALLINT and BIGINT for certain ranges of integers. T

Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE

The Package Body The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the p

%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

I need to write one function and one procedure to query a Oracle 10.1 DB using PL SQL. I have the schema and exact queries...along with work Ive started and a template to put the a

Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the