Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: create table with null value
"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 - 10:38:19 CST