Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 to fetch values from testtable1 that are not in testtable2 without using not keyword?

0 Answers  


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

0 Answers  


Difference between views and materialized views?

5 Answers   BirlaSoft,


What is difference sql and mysql?

0 Answers  


table name :Tab fields name 1.trx_no (pk) 2.trx_date 3.account code (7 char) 4.account type (1 char) 5.amt Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit . write a query to display the account code wise total debit and credit bal for the month of april 2004. write a query to display account code wise new amt credit for the april 2004

2 Answers   Maruti Suzuki,


What are hotfixes and patches?

0 Answers  


How is data stored on a disk?

0 Answers  


What are the constraints available in sql?

0 Answers  


What are the types of records?

0 Answers  


In table three columns with 1 milion records(here there is no sequence values) i want add one more column with sequence values from the first how it is posible?

4 Answers   Tech Soft,


what is the difference between cluster and non cluster index? : Sql dba

0 Answers  


What are primary key and foreign key and how they work?

0 Answers  


Categories