Article View: borland.public.interbase.sql
Article #11225Re: Setting not NULL constraint afterwards
From: Martijn Tonies
Date: Thu, 12 Dec 2002 08:01
Date: Thu, 12 Dec 2002 08:01
35 lines
1843 bytes
1843 bytes
Hi, > just a simple question: > > How can I set a field NOT NULL constraint afterwards. > There is a lot of data in that table and too much depencies > so I cannot drop and recreate that field again. > > I suppose "DEFAULT 0" would also be enough. In IB6 or higher, it should be. Also simply filling the column yourself, UPDATE ... SET MYCOL = 0 WHERE MYCOL IS NULL would do the same thing. > This is a problem because I have triggers which > increment and decrement that value and that can't be done > if value is NULL. -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase & Firebird Firebird Workbench - the developer tool for Firebird Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object."
Technical Details
Message-ID:
<3df841c4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3df8363f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,71b50d57bbdad000 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-12 00:09:02 PST From: "Martijn Tonies" <m.tonies@upscene_remove.com> Newsgroups: borland.public.interbase.sql References: <3df8363f$1@newsgroups.borland.com> Subject: Re: Setting not NULL constraint afterwards Date: Thu, 12 Dec 2002 09:01:54 +0100 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 212.238.179.102 Message-ID: <3df841c4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039679940 212.238.179.102 (11 Dec 2002 23:59:00 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail