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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Empty lines in CREATE TABLE statement?

Re: Empty lines in CREATE TABLE statement?

From: Brian Peasland <peasland_at_usgs.gov>
Date: Mon, 12 Mar 2001 14:23:13 GMT
Message-ID: <3AACDBD1.C3F9528C@usgs.gov>

The problem is not with the whitespace per se. Rather, it is SQL*Plus's treatment of the newline character. I am not familiar with any method to modify this. But you can try something like this:

   SQL> CREATE TABLE test (
     2>   a NUMBER,
     3>   /* some comment */
     4>   b NUMBER
     5>   );


HTH,
Brian

Heiko Gottschling wrote:
>
> Hi,
>
> the following CREATE TABLE statement works fine when executed in SQLPLUS:
>
> CREATE TABLE test (
> a NUMBER,
> b NUMBER
> );
>
> However, if I insert an empty line between the column definitions, I get an
> error message:
>
> CREATE TABLE test (
> a NUMBER,
>
> b NUMBER
> );
>
> >SP2-0042: unknown command "b NUMBER" - rest of line ignored.
> >SP2-0042: unknown command ")" - rest of line ignored.
>
> I find this very annoying, since I need to add some comments in the table
> definition, and not being able to insert empty lines clutters the code :-(
>
> Is this behavior a bug or a feature, and is there a way to turn it off (=
> treat newlines as normal whitespace)?
>
> thx
> Heiko
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Mon Mar 12 2001 - 08:23:13 CST

Original text of this message

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