Re: create table with null value

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Fri, 21 Feb 2003 08:38:19 -0800
Message-ID: <3E5655FB.FABFE80B_at_exesolutions.com>


"Séb" wrote:

> 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 ???

You need to identify the data type. Try this:

CREATE TABLE test AS
SELECT dummy,
DECODE(10000, 0, NULL, 999) test
FROM dual;

It is one heck of a kludge but it works.

I think a better route would be:

CREATE TABLE ... AS followed by ALTER TABLE ADD.

Daniel Morgan Received on Fri Feb 21 2003 - 17:38:19 CET

Original text of this message