Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4, sp5
then What type of Error You will find????

Answers were Sorted based on User's Feedback



I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4..

Answer / ramesh

Nothing Happend package body created with no  errors.
Ex:
 create or replace package jan
 is
 procedure sp1;
 procedure sp2;
 end;
PACKAGE CREATED

 create or replace package body jan as
 procedure sp1 as
 begin
 dbms_output.put_line('hello');
 end;
 procedure sp2 as
 begin
 dbms_output.put_line('how are you');
 end;
 procedure sp3 as
 begin
 dbms_output.put_line('ok');
 end sp3;
 procedure sp4 as
 begin
 dbms_output.put_line('ramesh');
 end sp4;
 end;
PACKAGE BODY CREATED

Is This Answer Correct ?    14 Yes 2 No

I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4..

Answer / ashokram s

As Ramesh said
when creating the package body with procs that are not declared in specification, no error will be throwed. But when executing you cant execute the undeclared procs:

SQL> SET SERVEROUTPUT ON;
SQL> EXEC jan.sp1;
hello

PL/SQL procedure successfully completed.

SQL> EXEC jan.sp2;
how are you

PL/SQL procedure successfully completed.

SQL> EXEC jan.sp3;
BEGIN jan.sp3; END;

*
ERROR at line 1:
ORA-06550: line 1, column 11:
PLS-00302: component 'SP3' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Is This Answer Correct ?    3 Yes 0 No

I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4..

Answer / abhijit

If you are saying SP defined in package specification then compiler will give an error PLS-00103.

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

How many joins in sql?

0 Answers  


C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September.

0 Answers  


How to write a procedure for displying the data in a TREE or (PARENT and CHILD ) relationship , for ex: A is the main project id, for this project B,C,D are sub tasks(sub project id's) for B the sub tasks are e,f,g and for c is h ,i ,j and for d is k,l,m now i need to display the o/p in a TREE fashion pls help me , thanks in advance surendra

2 Answers   Zensar,


How does sql store data?

0 Answers  


Why do we use function in pl sql?

0 Answers  






Two Methods of retrieving SQL?

7 Answers   Atiric Software, Microsoft, Oracle, TCS, Wipro,


How does a covering index work?

0 Answers  


What is cascade in sql?

0 Answers  


Is record in pl sql?

0 Answers  


What is oracle ? why we should go for oracle database instead of diffrent databases available in the industry.

5 Answers   Polaris,


Does sql view stored data?

0 Answers  


what is the use of set statement in tsql? : Transact sql

0 Answers  


Categories