Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8636829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:19:11+00:00 2026-06-12T10:19:11+00:00

I have a package named save_db_values I have two procedures named store_records and another

  • 0

I have a package named save_db_values

I have two procedures named store_records and another one called db_activities.
db_activities will be called from my application by passing all values in db_activities I will be calling store_records procedure to do insert and delete.

Do I need to define store_records procedure in package specification? When I did not define store_records in specification I am getting error store_records not declared in this scope.

store_records procedure I do not want to expose and hence I did not add in specification.
How can I resolve this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:19:12+00:00Added an answer on June 12, 2026 at 10:19 am

    If you do not want some procedures to be publicly available you may not to declare them in the package specification. Declare them only in the package body. The cause of the error you are facing is declaration order of the procedures in the package body or lack of forward declaration. For example:

     create or replace package Test_pkg as
      2    procedure Proc1;
      3  end;
      4  /
    
    Package created
    
    create or replace package body Test_pkg as
      2  
      3    procedure proc1 is
      4    begin
      5      proc2;
      6    end;
      7  
      8    procedure Proc2 is
      9    begin
     10      dbms_output.put_line('proc2 is being executed');
     11    end;
     12  
     13  end;
     14  /
    
    Warning: Package body created with compilation errors
    Error: PLS-00313: 'PROC2' not declared in this scope
    

    This is happening because we are calling Proc2 which declared later in the package. In this case our choices are:

    Declare pro2 before the procedure which calls it

     create or replace package body Test_pkg as
      2  
      3  
      4    procedure Proc2 is
      5    begin
      6      dbms_output.put_line('proc2 is being executed');
      7    end;
      8  
      9    procedure proc1 is
     10    begin
     11      proc2;
     12    end;
     13  
     14  end;
     15  /
    
    Package body created
    

    Use forward declaration.

    create or replace package body Test_pkg as
      2  
      3    procedure Proc2;
      4  
      5    procedure proc1 is
      6    begin
      7      proc2;
      8    end;
      9  
     10    procedure Proc2 is
     11    begin
     12      dbms_output.put_line('proc2 is being executed');
     13    end;
     14  
     15  
     16  end;
     17  /
    
    Package body created
    
    SQL> exec test_pkg.Proc1;
    
    proc2 is being executed
    
    PL/SQL procedure successfully completed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class named as order in package com.abc I have another class
i want copy pdf file from application path(/data/data/package name) to sdcard.for that i have
I have a package with logic classes(like CheckAuthenticationDataLogic.java, GetVocabulariesLogic.java). And another class - ApiService.java
I have a java application build upon Spring 3. This project has another jar
I have developed a web application using Spring 3.1 In one of the module
I have SSIS package which pulls the data from Excel(.xls) file and load the
I have found myself in the position of needing to update one or two
And i have a simple modelform for Package from models import Package from django
In Android, assuming that I have files in /data/data/package.name/, without knowing the names or
I have this procedure i my package: PROCEDURE pr_export_blob( p_name IN VARCHAR2, p_blob IN

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.