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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Simple? PL/SQL query

Re: Simple? PL/SQL query

From: Andor Gyula <gy.andor_at_euromacc.hu>
Date: Mon, 04 Sep 2000 16:30:49 +0200
Message-Id: <10609.116158@fatcity.com>


Hi,

You should set the serveroutput environmental variable on with the following command:

set serveroutput on

Gyula

"O'Neill, Sean" wrote:
>
> I'm new to PL/SQL and I am trying to use same to send output of name from
> v$database to screen. The code I'm using is as below but the output is not
> being sent to screen and I can't figure why not. The code is replying with
> "PL/SQL procedure successfully completed." in SQL*Plus. Maybe this is not
> the most appropriate way to approach this requirement and alternative method
> inputs are welcome too!. Are there any other ways to send output to screen
> aside from DBMS_OUTPUT?
>
> DECLARE
>
> db_name varchar2(20);
>
> BEGIN
> SELECT name
> INTO db_name
> FROM v$database;
> DBMS_OUTPUT.PUT_LINE
> ( 'Database name is ' || db_name );
Received on Mon Sep 04 2000 - 09:30:49 CDT

Original text of this message

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