GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 177 of 241    Print  
What is the difference between private packages and public package . what is the difference in declaration of these 2 packages.

  
Total Answers and Comments: 2 Last Update: May 20, 2008     Asked by: Chanukya Kumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 02, 2007 22:09:36   #1  
KiranKW Member Since: May 2007   Contribution: 7    

RE: What is the difference between private packages an...
hi

i dont think there is something called as public package / private package. But yes the methods defined in a package can either be public or private.

Below is a simple expln.

  • Variables and constants that are not defined within any function or procedure in the package are called package data.
  • Package data declared inside the package specification is called public package data.
  • Package data declared inside the package body is called private package data.
  • Private package data can be accessed only by elements defined in the package itself.
  • Public package data can be accessed by the package itself and by any program that can execute that package.
  • Package data structures public and private act like globals and persist within a single Oracle session or connection.

  •  
    Is this answer useful? Yes | No
    May 20, 2008 22:29:35   #2  
    mosam Member Since: May 2008   Contribution: 2    

    RE: What is the difference between private packages and public package . what is the difference in declaration of these 2 packages.
    u can not create thr private packages in oracle becoze packages can not be nasted
     
    Is this answer useful? Yes | No

     Related Questions

     %  ROWTYPE  is to be used whenever query returns a entire row of a table or view. TYPE  rec  RECORD is to be used whenever query returns columns of differenttable or views 
    Latest Answer : %ROWTYPE is used when you need to work with complete record.TYPE RECORD is used to create your own data type with specificed number of values to hold.Suppose If a table has 20 columns and you need to work with only seven columns . If I use %ROWTYPE, ...

     Cursor is a named private SQL area from where information can be accessed. Cursors  are  required  to  process rows individually for queries returning multiple rows. 
    Latest Answer : Cursor is an small memory allocation or workstation where operation or processing is done on the data.Types of attribute of cursor are-:1)ROWCOUNT2)ISOPEN3)FOUND4)NOTFOUND ...

     Raise_application_error  is  a  procedure  of  package  DBMS_STANDARD which allows  to  issue an user_defined error messages from stored sub-program or database 
    Latest Answer : You can use this procedure to issue user-defined error messages from stored subprograms.You can report errors to your application and avoid returning unhandled exceptions.Syntax: raise_application_error (error_number,message[, {TRUE | FALSE}]); ...

     In the standard package. Procedures, Functions & Packages ; 
    Latest Answer : Predefined exceptions  are globally declared in standard package ...

     A FUNCTION is always returns a value using the return statement.        A  PROCEDURE   may  return one or more values through parameters or 
    Latest Answer : 1. Function is mainly used in the case where it must return a value. Where as a procedure may or may not return a value or may return more than one value using the OUT parameter. 2. Function can be called from SQL statements where as procedure can not ...

    The Same procedure name is repeated with parameters of different datatypes and  parameters  in  different  positions,  varying number of parameters is called overloading of 
    Latest Answer : Definining two or more procedures with same name is called overloading of procedures. But they must differ in no or order or datatype family of formal arguments. ...

     The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Package Specification contains declarations that are global to the packages and local to the schema.Package  Body  
    Latest Answer : A package usually has a specification and a body, stored separately in the database.The specification is the interface to your applications. It declares the types, variables, constants, exceptions, cursors, and subprograms available for use. The package ...

    What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?
     A  cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package.A  cursor declared in a procedure is local to the procedure that 

         a. Stored procedure or anonymous block     b. an application program such a PRC *C, PRO* COBOL     c. SQL *PLUS      
    Latest Answer : a. PACKAGE NAME.PROCEDURE NAME (parameters);     variable := PACKAGE NAME.FUNCTION NAME (arguments);        b.     BEGIN     PACKAGE NAME.PROCEDURE ...

    Name  the  tables  where  characteristics  of  Package,  procedure and functions are stored ?
     User_objects, User_Source and User_error.  


     Sponsored Links

     
    Related Articles

    Querying Data with Oracle XQuery

    Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
     

    Using Oracle XML DB Repository

    Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
     

    Using Oracle Database for Storing, Modifying, and Retrieving XML Data

    Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
     

    XML Processing in PHP and Oracle Applications

    Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
     

    PHP Oracle Web Development

    PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
     

    Getting Started with Oracle and ODP.NET

    ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
     

    PHP Oracle Web Development Review

    PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
     

    Step by Step Oracle PL-SQL Tutorial

    This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
     

    Working with XML in Oracle

    Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
     

    What is Oracle Net Service

    Oracle Net Services provides enterprise-wide connectivity solutions in distributed, heterogeneous computing environments. Oracle Net Services eases the complexities of network configuration and management, maximizes performance, and improves network diagnostic capabilities. Oracle Net, a component
     

    About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

    Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

    Page copy protected against web site content infringement by Copyscape