So what's this business with Oracle allowing programmers to put programs in databases? That's right. They're called Oracle stored procedures, and they're quite useful. Mooh the Cow walks you through writing, creating, debugging, and deleting a procedure.
To make the most of this article, try out the code examples provided. You will need some basic software and skills.
Your software checklist:
A text editor. The code examples were written with Microsoft ® Notepad version 5.1, supplied with the operating system called Microsoft ® Windows XP Professional.
A tool to submit Oracle SQL and PL/SQL statements to an Oracle database. The code examples were tested in Oracle's SQL*Plus tool, version 220.127.116.11.0 for Windows.
An Oracle database you can connect to with a user name and password. Your user name should be set up with the permission to write procedures: the CREATE PROCEDURE system privilege. The code examples were tested on an Oracle9i database, version 9.2.0.
Your skills checklist:
Basic knowledge of SQL, the language used to manipulate (insert, update and delete) data in a relational database.
Basic experience using Oracle's SQL*Plus tool.
Basic experience using Oracle's PL/SQL programming language.
Now, to get you started, let's learn how to write a procedure.