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

Home -> Community -> Usenet -> c.d.o.server -> Re: pl/sql

Re: pl/sql

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 12 Jun 2003 15:46:36 -0700
Message-ID: <3EE902CC.25D58750@exxesolutions.com>


Tim wrote:

> i'm having a problem printing in Oracle pl/sql.
> I wrote a procedure. it gets create fine, then I lose connection to
> db after i create the procedure. I can't call the procedure, or even
> do a simple query to the db.
>
> does anyone know how to properly create a simple procedure, then call
> it, but within the procedure, i need a print statement that will print
> to screen the ouput, so i will know it works.
>
> thanx.
>
> -tim

CREATE OR REPLACE PROCEDURE test IS

x VARCHAR2(10);

BEGIN
   x := 'Success';
   DBMS_OUTPUT.PUT_LINE(x);
END test;
/

SQL> SET SERVEROUTPUT ON
SQL> exec test

Never put this code into testing or production. After development is completed, remove it.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Jun 12 2003 - 17:46:36 CDT

Original text of this message

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