Board index » delphi » remove constraint "NOT NULL" from column

remove constraint "NOT NULL" from column

Hi!

I need to remove a "NOT NULL" constraint from a table column, but I can't
find any syntax on this problem.

"ALTER TABLE tbname MODIFY colname ... " offers no possibility to do solve
my problem. Does anybody know the answer?

Thanks for your help.

Andreas, Germany.

 

Re:remove constraint "NOT NULL" from column


Andreas,

Quote
> I need to remove a "NOT NULL" constraint from a table column, but I can't
> find any syntax on this problem.

> "ALTER TABLE tbname MODIFY colname ... " offers no possibility to do solve
> my problem. Does anybody know the answer?

There is no "official" way to do that, because InterBase doesn't offer a
DDL statement for that. Most third-party admin/dev tools support that
by executing a tricky system table update. For example just one mouse
click in Database Workbench ;-). http://www.upscene.com

Regards,
Thomas Steinmaurer
http://www.iblogmanager.com

Re:remove constraint "NOT NULL" from column


Why don't you create a new column without the not null constraint, them copy
the old column to the new one, drop the old column and rename the new one.

Antoine

"Andreas Neef" <an...@oasdatic.de> a crit dans le message news:
3e82a...@newsgroups.borland.com...

Quote
> Hi!

> I need to remove a "NOT NULL" constraint from a table column, but I can't
> find any syntax on this problem.

> "ALTER TABLE tbname MODIFY colname ... " offers no possibility to do solve
> my problem. Does anybody know the answer?

> Thanks for your help.

> Andreas, Germany.

Other Threads