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: Does ORACLE has any stupid restrictions like MS-SQL

Re: Does ORACLE has any stupid restrictions like MS-SQL

From: Zev Sero <zsero_at_mail.idt.net>
Date: 1997/03/19
Message-ID: <33304fb8.320149641@news.idt.net>#1/1

Steve Phelan <stevep_at_pmcgettigan.demon.co.uk> wrote:

>For instance, changing a column from, say, NULL to NOT NULL is OK, but
>going the other way - well, you'd have to empty the table first.

Why on earth would Oracle, or any database for that matter, impose such a restriction? As it happens, Oracle does not. It is perfectly OK to change a column from NOT NULL to NULL, or vice versa. Of course, before you impose the NOT NULL restriction you do have to make sure that the column has values in all rows, just as before you create a unique index you have to make sure that the columns you specify are in fact unique!

To change the NULL restriction on a column, just do:   alter table xxx modify (yyy not null); or:
  alter table xxx modify (yyy with null);

--
Zev Sero		Don't blame me, I voted for Harry Browne
zsero@idt.net		For more info, see http://www.lp.org
Received on Wed Mar 19 1997 - 00:00:00 CST

Original text of this message

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