469,275 Members | 1,802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

null -> not null or vice versa?

I would like to alter a table's column from null to not null. Is this
possible or can you only do the reverse?

If I can do it, what's the syntax, the .pdf doesn't describe it.

TIA,
Chris

Nov 12 '05 #1
1 1045
You can't do anything in an alter statement that may invalidate any possible
existing SQL statement (let alone invalidate any existing content). In this
case, since the column permits a NULL, you cannot change it to no longer do
so. For the same reason, you can only add a new nullable column if it has a
default.

You will need to unload, drop, create and load the table. All of these
commands and SQL statements are documented.

<cb******@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I would like to alter a table's column from null to not null. Is this
possible or can you only do the reverse?

If I can do it, what's the syntax, the .pdf doesn't describe it.

TIA,
Chris

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Valentina Boycheva | last post: by
4 posts views Thread by Chris Gordon-Smith | last post: by
5 posts views Thread by Protoman | last post: by
2 posts views Thread by Steve - DND | last post: by
1 post views Thread by Maric Michaud | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.