Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: pl/sql
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