Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2007, 05:10 PM
Authorized User
Join Date: Jan 2007
Location: , , .
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
Default Function and Procedure

What are procedures and functions in Oracle and how to convert a function into a procedure and vice versa.
Please provide examples.


Life is an endless journey towards perfection

Life is an endless journey towards perfection
  #2 (permalink)  
Old March 26th, 2007, 01:23 AM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts

Procedures are named and stored that may or may not return a value. However, they must return the success or failure at execution time.

Functions are similar to procedures in structure, but they MUST return a single value by using the RETURN-value clause. Functions are also named and can be called from a procedure.

Hope this helps.

Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
  #3 (permalink)  
Old July 24th, 2007, 07:05 AM
Authorized User
Join Date: Sep 2004
Location: Edegem, Antwerpen, Belgium.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts

NOTE: Functions can also return tables like in this sample: http://geertverhoeven.blogspot.com/2...rns-table.html

The main different is the way how to use them.

A function can be used within a query where a procedure can't.




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Function Procedure reneemettrie Excel VBA 0 June 13th, 2008 11:06 AM
Function used in procedure mikedeepak SQL Server 2000 3 February 13th, 2008 05:23 AM
Procedure or function has too many arguments Raby VB Databases Basics 6 November 16th, 2007 11:38 AM
Procedure or function STOREDPROC has too man rit01 ASP.NET 2.0 Basics 4 January 25th, 2006 09:51 AM
Analytical function and stored procedure akmhasan Oracle 2 November 14th, 2003 01:41 PM

All times are GMT -4. The time now is 07:00 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.