>> I don't read the whole thread
>> > 
>> > I did that, and when I clicked on "save" to close the edit view of the
>> > table, I received a warning message: 
>> > 
>> > "Warning! The column "ID" could not be changed. Should the column
>> > instead be deleted and the new format appended?"
>> > 
>> > So should I click "yes"? I don't mind if it deletes my current "ID"
>> > column if it creates another and populates the column. But I have some
>> > rather large tables to do after this one, and want to make sure I'm not
>> > going to lose anything by doing this.
>> 
>> Do you use the internal HSQLDB?
>> Then it is a known bug
>
>ok, but what should I do? Do I say "yes", or, "No"?
>
>What sort of "bug" is it? i.e. is the "bug" superficial, such that the
>file will still work fine if I say yes, or is something going to go
>seriously wrong? 
>
>How does one manage the situation in view of the bug. 

Hi Dinbandhu,

OK - you have a table imported, yes.

Now you want to set the ID field to auto_increment and identity.

I just did this under Ubuntu - my last remarks where a little off - sorry.

The steps are as follows:

During import you must set the column that will be the PK and Auto_increment to 
'REQUIRED" - therefor no NULLs are allowed.

After the import, you open the table in the table editor. In the list of 
tables, right click on the table and select EDIT.

NOW set the column to be the PK. Save the table.

Then you must use the SQL window to handle the last step.
Open the SQL window with TOOLS > SQL

Assuming my table is named Table1 and the column is named ID I would enter this 
command:

ALTER TABLE "Table1" ALTER COLUMN "ID" IDENTITY

Click on the Execute button.

The column type is changed without any loss of data.

For detailed description of that command look at the HSQLdb users guide 
available at http://hsqldb.org

Drew

Reply via email to