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
Defining Autonomous Transactions To define an autonomous transaction, you use the pragma (compiler directive) AUTONOMOUS_TRANSACTION. The pragma instructs the PL/SQL compiler

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Row Counterparts of Table Operators SQL does not have counterparts tuple rename, tuple projection, tuple extension, tuple join and tuple compose. To obtain the same effects as

SQLs counterpart of the key words: The text from the opening parenthesis to the end of the fourth line specifies the declared type of the table, meaning that every table ever

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!). a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange the

IF Statement The IF statement executes a series of statement conditionally. Whether the series is executed or not depends on the value of the Boolean expression. Syntax:

Develop Data Business Intelligence Project Project Description: We are linking our Microsoft SQL Database to GoodData Business Intelligence. We are seeking somebody who has e

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Authorize and fetch data from Instagram Project Description: Incorporate Instagram feed on mobile site platform: c#, ms sql, jquerymobile, jquery Web admin Author