| 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 |
Send this thread to your friend |