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 -> Re: PL/SQL : How do you echo text to screen ?

Re: PL/SQL : How do you echo text to screen ?

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1997/01/02
Message-ID: <32cb0ac6.1384590@dcsun4>#1/1

If you are using sqlplus or sqldba or svrmgrl to run your pl/sql you can:

SQL> set serveroutput on
SQL> begin
   >    dbms_output.put_line( 'Hello World' );
   > end;

Hello World

PL/SQL Procedure completed....

SQL> On 1 Jan 1997 05:55:13 -0600, aak2_at_Ra.MsState.Edu (Atif Ahmad Khan) wrote:

>
>I am new to PL/SQL and need to echo some strings to the screen.
>Something to the equivalent of
>
>echo 'This is a test'; in shell and
>select 'This is a test' from dual ; in SQL
>
>In PL/SQL I can do the following :
>
>begin
> declare product char(7);
> begin
> select part_number
> into product
> from table1
> where part_number='123456';
> end;
>end;
>
>This only puts the part_number in the variable product. I would like
>PL/SQL to display it on the screen somehow.
>
>As you can see what I am trying to do is rather simple but my lack
>of experience in this area is preventing me from achieving it.
>
>I would appreciate any helpful hints.
>
>Atif Khan
>aak2_at_ra.msstate.edu

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com


statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Thu Jan 02 1997 - 00:00:00 CST

Original text of this message

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