Results 1 to 4 of 4

Thread: Packages in oracle database

  1. #1
    Join Date
    Jan 2010
    Posts
    53

    Packages in oracle database

    What is the use of packages in oracle database,another facility of database like functions and procedures are available. what is the purpose of creating packages and how it would be constructed. what is the difference between bodiless and normal packages.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Packages in oracle database

    Packages:
    A package is constructed using the collection of some procedures, functions, variables and SQL statements which is treated as a single unit.A package having two sections :

    1. Package Specification
    2. Package Body.

    The first part of the package contains some declaration like variables ,types,exceptions,cursor ,etc and on other hand the second part of the package body contains some valuable code that builds a package.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Packages in oracle database

    Creating specification of Package:

    A package specification act as an interface for package.It contains some declaration of variable and required specification for body construction.

    The syntax would be as follows;

    Code:
    PACKAGE Package_name
     IS
    [Declaration of variables and types] 
    [specification of cursor]
    [specification of modules]
    
    END [Package_name];

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Packages in oracle database

    Creating package body:

    Package body holds all the code and implement the subprograms, queries. It generate the some action with the help of specification packages and helps to retrieve the required information through the constructed package.

    The syntax would be as follows :

    Code:
    PACKAGE BODY Package_name
     IS
     [Declaration of variables and types] 
        [specification and SELECT statement of cursor]
           [specification and body of modules]
               [BEGIN 
                 executable statements ]
    
    [EXCEPTION exception handlers]
    
             END [Package_name];

Similar Threads

  1. Statpack in oracle database
    By Reegan in forum Networking & Security
    Replies: 5
    Last Post: 16-02-2010, 08:00 PM
  2. Joins in oracle database
    By Adriana_andros in forum Software Development
    Replies: 5
    Last Post: 11-02-2010, 08:53 PM
  3. Dynamic SQL in Oracle database
    By Adriana_andros in forum Software Development
    Replies: 5
    Last Post: 11-02-2010, 07:49 PM
  4. Connect to Oracle database using VB 6.0
    By Ariadne in forum Software Development
    Replies: 2
    Last Post: 19-01-2009, 06:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,006,742.40631 seconds with 17 queries