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

Home -> Community -> Usenet -> c.d.o.server -> Re: create table with null value

Re: create table with null value

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 20 Feb 2003 23:32:25 GMT
Message-ID: <b33oi9$1iebaj$1@ID-82536.news.dfncis.de>

> Hello,
> When I create a table toto2 as
> select
> col1,
> col2,
> null col3
> from toto;
>
> I have the error 'column with length equal to zero is not possible'.
>
> How can I do that ???

On 9i you can do it like

create table toto2 as
  select
    col1,
    col2,
    cast(null as varchar2(5)) col3
  from
    toto;

hth

Rene Nyffenegger

BTW: crosspost to c.d.o.tools removed.

-- 
  no sig today
Received on Thu Feb 20 2003 - 17:32:25 CST

Original text of this message

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