dbms_output.put_line command is not working

I have installed Oracle 8i Enterprise Editions as an Oracle server (8.1.1.6), but the dbms_output.put_line command is not working. I have done the command in the following statements:

SQL> 1  declare 
SQL> 2  dbms_output.put_line("Babu") 
SQL> 3* end; 
SQL> declare 
  2  dbms_output.put_line("Babu"); 
  3  end; 
  4  / 

dbms_output.put_line("Babu"); 
           * 
ERROR at line 2: 
ORA-06550: line 2, column 12: 
PLS-00103: Encountered the symbol "." when expecting one of the following: 
constant exception <an identifier> 
<a double-quoted delimited-identifier> table LONG_ double ref char 
time 
timestamp interval date binary national character nchar The symbol 
"<an identifier>" was substituted for "." to continue. 
ORA-06550: line 3, column 1: 
PLS-00103: Encountered the symbol "END" when expecting one of the following: 
begin function package pragma procedure subtype type use <an identifier> 
<a double-quoted delimited-identifier> cursor form current 

Could you please provide a solution?


    Requires Free Membership to View

Instead of DECLARE, use BEGIN. You have an END, but not a beginning. And do not put a semicolon after the BEGIN keyword.

This was first published in October 2004

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.