GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 20 of 166    Print  
can we call a procedure into another procedure?If yes means how you can pass the perameters for the two procedures?

  
Total Answers and Comments: 2 Last Update: October 27, 2006     Asked by: kumar71979 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 20, 2006 15:56:30   #1  
dhk Member Since: April 2006   Contribution: 3    

RE: can we call a procedure into another procedure?If ...

Hello friend

while creating a procedure body we can call other procedure in that body

for example

if your creating the procedure body p1 we can call the procedure p2 in the procedure body p1

syntax

create or replace procedure p1(a number) is

b number;

begin

p1(10);-- calling first procedure

end;

when you execute procedure p1

exec p1(10) -- it will execute both p1 and p2


 
Is this answer useful? Yes | No
October 27, 2006 15:07:17   #2  
Arun        

RE: can we call a procedure into another procedure?If ...
Hi friendit is easyExamplecreate or replace procedure first_proc (v_name1 in varchar v_age in number) isbegindbms_output.put_line(v_name||' is '||v_age||' years old!');end;create or replace procedure second_proc (v_name2 in varchar2 v_dob date) isdeclare m_age number;begin m_age : round(months_between(sysdate v_dob)/12); first_proc(v_name2 m_age);end;to execute SQL> exec second_proc('Arun' '12-JUL-1990');SQL> Arun is 16 years old!hope this helps
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : 1)Using DBMS_JOB package,we can schedule the job.There are number of built-in functions in that package to schedule a job.Ex:DBMS_JOB .SUBMITDBMS_JOB .RUN.2) Using DBMS_SCHEDULERTHIS I SYNTAX FOR CREATING JOBdbms_scheduler.create_job(ob_name             ...
Read Answers (6) | Asked by : kishorebabu

What is the Scalar Data type in PL/SQL?what is the forward decleration in packages?what is the usage of IN,OUT,INOUT parameters in Procedures or functions?
Read Answers (5) | Asked by : chiranjeevi reddy

How to query to know, that dbms_rowid package contains ROWID_OBJECT, rowid_block_number ,etc procedures or functions in it.

Can we call a procedure into another procedure?If yes means how you can pass the perameters for the two procedures?

Latest Answer : First create a Trigger and with Procedure you insert records.The :new will take the new values.So use Triggers in Procedures. ...
Read Answers (1) | Asked by : p

Latest Answer : no difference ...
Read Answers (9) | Asked by : Suyog

How to return multiple records from procedure?e. g. I fired a select query and I want to retun a result to ?

I have written a procedure in which the cursor is fetching 2 lakh records. I would like to pass on these 2 lakh records as an in paramter to the other procedure. How can we achieve this logic?
Read Answers (4) | Asked by : Srinivas

Latest Answer : Hi Friend!         If you deal with better performance You have to refer REF CURSOR and its more advantage and effecient of Exeqution.Thanks&RegdsRamki ...
Read Answers (1) | Asked by : chandu

Help me to write a procedure for:verify a table for record if it is exists need to update or else insert that record( using cursor write a procedure )
Read Answers (4) | Asked by : Srinivas


 Sponsored Links

 
Related Articles

What are the differences between stored procedures and triggers?

Stored procedures are compiled collection of programs or SQL statements that live in the database. A stored procedure can access and modify data present in many tables. Also a stored procedure is not associated with any particular database object. But triggers are event-driven special procedures whi
 

How does the function call within function get evaluated?

Whenever we have more than one function which is called for a finite number of times then such a function gets evaluated from inside out. Let us understand this concept with an example. For instance consider a function sample called within it 4 times as given in program below: main() { int a=50;
 

How to call C header that is not provided generally by system in C++?

Headers can be called by using extern C Syntax of extern C is: extern "C" <function declaration> for example to call C functions from C++ we can write extern "C" { <function declaration> <function declaration> ...
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

XML Remote Calling Procedure

XML Remote Calling Procedure XML RPC or the XML Remote Calling Procedure is a set of compilations and implementations which allow certain programs to run on complex platforms or operating systems and allows them to make Remote Procedure calls on the Internet The Remote Procedure Calling Protocol use
 

Procedure for getting Scholarships

Procedure for getting Scholarships If you have done a bit of research you are probably well aware of the fact that there is a great deal of money available for scholarships Having said that it is sad to see that so many students graduate from college with lots of students loans when they could have
 

Call by Value and Call by Reference

Call by Value and Call by Reference In this tutorial you will learn about C Programming What is difference between call by value and call by reference in function mosgoogle The arguments passed to function can be of two types namely 1 Values passed 2 Address passed The first type refers to call by
 

SQL Server Stored Procedures

In this tutorial you will learn further more about Access and Manipulate SQL Server data Using Stored Procedures Creating a Stored Procedure Running Stored Procedures from NET Using Parameters in Stored Procedures The IDENTITY Variable Access and Manipulate SQL Server data Using Stored Procedures mo
 

Tutorial 13: Oracle 9i : Procedures and Functions

This tutorial covers Developing Procedures and Functions Creating a Procedure Executing a Procedure Creating a Function Executing a Function Passing Parameters IN Parameters OUT Parameters IN OUT Parameters Purity of a User Defined Function and Positional and Named Notations mosgoogle Oracle 9i Proc
 

SQL Server 2000: Using System and Extended Stored Procedures

This tutorial covers how to use System Stored Procedures which are stored in master and msdb databases and normally begin with sp and Extended Stored Procedures normally begin with xp Using System Stored Procedures mosgoogle Whenever you add a database add a login create a table or modify any
 

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