| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> How do I start a PL/SQL program?
Hello:
I'm just starting to learn PL/SQL, I got my first book 'oracle ps/sql
programming'. Right there at the start of the book the author shows an
example of what a procedure looks like.
I got Oracle 8.0.5 on a linux server, and I created the tables that the
example in the book uses. I wrote the example exactly as is in the book
using vi (unix text editor) but I don't know what to do with the program. I
use sqlpus, and connected as the owner of the table. The I typed:
@program.sql
And then the prompt of sqlplus is replaced by numbers that grow sequentially
every time I press ENTER
The program is this:
PROCEDURE maintain_company
(action_in IN VARCHAR2,
id_in IN NUMBERL,
name_in IN VARCHAR2 := NULL)
IF action_in='DELETE'
THEN
DELETE FROM COMPANYINFO WHERE company_id =
--COMPANY INFO IS CREATED IN MY SERVER
ELSIF
action_in = 'INSERT'
THEN
INSERT INTO company (company_id, name)
VALUES (id_in, name_in);
END IF;
Thanks for your help
andres
Received on Fri Sep 17 1999 - 11:08:29 CDT
![]() |
![]() |