Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Function!!!!

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Function!!!!
 Rush  Posted: Mar 20, 2007 06:59:03 AM

 Total Post: 127
 Joined: Jan, 2007






 hi all,
i want to know that can function be replaced by procedure and vice-versa????

RUPESH

 Oracle Virus
Posted: Mar 20, 2007 08:28:21 AM  

 Total Post: 50
 Joined: Jan, 2007






 
Dear Rush,
You are not supposed to replace Procedure with Function or vice-versa. Each has its own purpose. Dont forget the base line mentioned below.

FUNCTION WILL RETURN A VALUE.

PROCEDURE WILL PERFORM AN ACTION.

Regards,
Aneel Kanuri

 Rush
Posted: Mar 20, 2007 11:41:21 PM  

 Total Post: 127
 Joined: Jan, 2007






 
hello Aneel'
so this is the original name of our oracle virus!:)
ok sir,i understand the diff but there was little confuson so i needed help and you show me the right way
thanks

RUPESH

 gps
Posted: Mar 21, 2007 05:52:53 AM  

 Total Post: 40
 Joined: May, 2006






 
Dear Aneel Ji, as i have worked on procedures and functions as well and know the basic differecne between the two, i guess that a function can be written as a procedure but each procedure can not be written as a funtion because a function has to return a value whereas a procedure may return zero, one, two or more values.

 Devesh
Posted: Mar 21, 2007 09:00:19 AM  

 Total Post: 29
 Joined: Oct, 2005






 
One more thing, function can be used in select query but a proc. can't.

 snehalatha
Posted: Mar 22, 2007 07:20:12 AM  

 Total Post: 169
 Joined: Apr, 2006






 
Plese see the major differeces b/w function and procedure

Procedure: 1) to perform an action
2) We can use the parameter modes (IN,OUT,INOUT)Effectively rather than function
3) we can't use to in SELECT statment

Function: 1) to compute a value
2) if we use the parameter modes FUNCTION is WEEK ( so we can't convert)
3) we can use in select statment( conditions apply)



 Oracle Virus
Posted: Mar 22, 2007 10:36:23 AM  

 Total Post: 50
 Joined: Jan, 2007






 
Dear All,
Good Response. I appreciate it. I am eager to learn pretty new things. Got some points from snehalatha. Good work.

Regards,
Oracle Virus

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software