Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How do I start a PL/SQL program?

How do I start a PL/SQL program?

From: andres <andres_valdes_at_hotmail.com>
Date: Fri, 17 Sep 1999 12:08:29 -0400
Message-ID: <qLtE3.95$Xa7.1748@client>


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)

IS
BEGIN
        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;

END;
/

Thanks for your help
andres Received on Fri Sep 17 1999 - 11:08:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US