Re: How can I change a 'not null' column to null?

"M. A. Sridhar" <[email protected]>
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Thanks, Toby, that did it.

Regards.

--- Tobias Downer <[email protected]> wrote:

> You will need to use the Mckoi SQL specific extension 'ALTER CREATE 
> TABLE' to alter the column.  For example, if your table contains three 
> columns 'a', 'b', 'c' and was created with the following command;
> 
> CREATE TABLE ATable (
>    a INTEGER,
>    b INTEGER NOT NULL,
>    c INTEGER
> )
> 
> Now you wish to remove the NOT NULL constraint from 'b' you may use the 
> following command;
> 
> ALTER CREATE TABLE ATable (
>    a INTEGER,
>    b INTEGER,
>    c INTEGER
> )
> 
> With global table altering commands like this, it is a good idea to make 
> a backup before you perform the operation because a typo in the command 
> could destroy data.  For example, if the altered table definition 
> doesn't contain a column in the original table it will be deleted.
> 
> Toby.
> 
> 
> M. A. Sridhar wrote:
> 
> > Hi,
> > 
> > I have a table with lots of rows in it, and the requirement now is to
> change
> > one of the non-null columns (which happens to be a foreign key, if that's
> > relevant) from 'not null' to 'null'. Can someone please tell me the magic
> SQL
> > incantation to achieve this? 
> > 
> > I'm using Mckoi 1.0.2.
> > 
> > Thanks in advance.
> > 
> > =====
> > M. A. Sridhar
> 
> 
> 
> ---------------------------------------------------------------
> Mckoi SQL Database mailing list  http://www.mckoi.com/database/
> To unsubscribe, send a message to [email protected]
> 
> 


=====
M. A. Sridhar


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.