Is there anyway can I alter a column of a table from NULL to NOT NULL.
Please email to me for any responses.
BTW, is it possible to add a NOT NULL column to an existing table which has
data in its.
--
Truong Phan
============================================================================
==
Truong Quang Phan
Chip Application Technologies (C.A.T)
Voice: 61 2 9332 4955
Fax: 61 2 9332 3711
Email: tru...@usa.net, tru...@cta.com.au
============================================================================
==
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Chip
Application Technologies Limited.
Sorry!
But as far as I know the features of SQL-Server both things are impossible.
Perhaps you could add a new column allowing NULL and using a default.
Afterwards you can set the value for all existing columns to this default!
Don't know if this helps!
Michael
>
> Is there anyway can I alter a column of a table from NULL to NOT NULL.
> Please email to me for any responses.
It is possible to make the setting "allow null" (ex. by Sybase Central or
by sql-statement)
But first, you have to check if the column is filled up for every row,
record !!
Then , you can change the property !!
By sql statement :
alter table <table> modify <column> not null
In the past, I have already had such situations....
>
> BTW, is it possible to add a NOT NULL column to an existing table which
has
> data in its.
No ! First add the column to the table, fill up with data and then change
to 'NOT NULL"
Filip Crombez