![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Aug 4 2010 7:05 AM | Permanent Link |
Uli Becker | EDB 2.03 Build18 non-unicode
Delphi2010 WIN7 I try to alter a column to "NOT NULL" from NULLABLE: ALTER TABLE "Scheine" ALTER COLUMN "SaetzeID" AS INTEGER DEFAULT 1 NOT NULL and get error ElevateDB Error #1004 The column SaetzeID in the table Scheine cannot be NULL If I remember well I did that before quite some times and the default value was entered automatically where it was NULL before. Am I wrong? Uli |
Wed, Aug 4 2010 8:03 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Uli
I think DEFAULT only works on new rows so you'll need to populate the column first then alter it. Roy Lambert [Team Elevate] |
Thu, Aug 5 2010 3:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Uli,
<< If I remember well I did that before quite some times and the default value was entered automatically where it was NULL before. Am I wrong? >> A new DEFAULT clause only works on ADDed columns, not on ALTERed columns. The reason is that there is no guarantee that someone wants their existing NULL columns defaulted, simply because they're adding a DEFAULT clause for new rows. At some point there will probably be a clause to specify this behavior, though. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, July 10, 2025 at 10:36 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |