What is the difference between a procedure and a function ?
A database procedure is a database object that contains a series of statements and, therefore, forms an independent part of a program. Database procedures are created and stored in the database. They can contain parameters. You can define any number of database procedures. To execute a database procedure, you must call it from an application program using the appropriate SQL statement. A database function is a special database procedure. A database procedure can only have one output parameter.