V4RB2 Alter Table Question

Claudius Sailer Claudius at sailer-online.de
Thu Aug 31 17:41:43 CDT 2006


Am 31.08.2006 um 15:54 schrieb Ivan Smahin:

> 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 at 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?

I would expect something like this

ALTER TABLE Kategorien ADD Beinflussbarkeit=3 Byte NOT NULL

or

ALTER TABLE Kategorien ADD Beinflussbarkeit Byte NOT NULL SET  
Beeinflussbarkeit=3

but in the table description  there is nothing with DEFAULT=3. Now I  
have in table description for this field the information DEFAULT=3  
something I don't want.

bye


Claudius

-- 
iMac CD 2GHz / MacOS X 10.4de / RB 2006r3/ Valentina 2.4.1
Homepage    http://www.ClaSai.de
iChat        ryhoruk
RealBasic ListBoxes: [ I feel the need...the need for speed!!! ]




More information about the Valentina mailing list