Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modify a no null column

0 views
Skip to first unread message

Schott Beckham

unread,
Jan 23, 2000, 3:00:00 AM1/23/00
to
I have a column that doesn't allow nulls, now i need to change it to allow
nulls. Is there a way without exporting, dropping and recreating.

Radu Lascae

unread,
Jan 23, 2000, 3:00:00 AM1/23/00
to
Modified from BOL:

ALTER TABLE MyTable ALTER COLUMN NullCol NVARCHAR(20) NULL

The compatibility level must be 70 for this to work. There are some
stringent rules that may also prevent this to work, as not all columns are
nullable. Refer to the SQL Server 7 BOL on the ALTER TABLE statement.

Hth
--
Radu Lascae
please reply to messages in the group
Schott Beckham <sch...@cfl.rr.com> wrote in message
news:8ovi4.2792$T82....@typhoon3.tampabay.rr.com...

BPMargolin

unread,
Jan 23, 2000, 3:00:00 AM1/23/00
to
Schott,

Radu has posted a solution for SQL Server 7.0. If you are working with an
earlier version, then you have no alternative to exporting, dropping and
re-creating.

0 new messages