V4RB2 Alter Table Question
Ivan Smahin
ivan_smahin at valentina-db.com
Thu Aug 31 16:54:29 CDT 2006
Hello Claudius,
Wednesday, August 30, 2006, 9:32:31 PM, you wrote:
> Hi Ruslan,
> Am 30.08.2006 um 20:10 schrieb Ruslan Zasukhin:
>> On 8/30/06 7:04 PM, "Claudius Sailer" <Claudius ÎÁ sailer-online.de>
>> wrote:
>>
>>> Hi,
>>>
>>> I want to alter a table and I do it this way because all other tries
>>> fails because of NOT NULL
>>>
>>> ALTER TABLE Kategorien ADD Beinflussbarkeit Byte DEFAULT 3 NOT NULL
>>>
>>> I really would do
>>>
>>> ALTER TABLE Kategorien ADD Beinflussbarkeit Byte NOT NULL
>>> UPDATE Kategorien SET Beeinflussbarkeit=3
>>>
>>> is this no longer supported?
>>> How can I delete after Alter Table the setup DEFAULT 3?
>>> Or is this something which is now allways there?
>>
>> Ivan say that he cannot reproduce. For him works
>> ALTER TABLE Kategorien ADD Beinflussbarkeit Byte NOT NULL
>>
>> So I assume secret is in your db.
>>
>> Please try open db in viSQL or in Vstudio, and try this ALTER command.
>> If reproduce, then please send us your db.
>>
>> Also I think good idea add this issue into Mantis
> #1772
> everything is attached.
> Screenshot from viSQL and database for testing
Yes, I see.
The source of "problem" is filled table.
You can not add not-nullable field or field without default value to
filled table.
Simple reason - what values do you expect to see in that field for
existing records?
--
Best regards,
Ivan mailto:ivan_smahin ÎÁ valentina-db.com
More information about the Valentina
mailing list