updating an existing SQLite table

cwt

Active Member
Licensed User
Longtime User
If I have an existing SQLite table that I have added a new column to how can I convert the old table to the new table definition without deleting the old table? Is there an example for this?

Thanks
 

Hubert Brandel

Active Member
Licensed User
Longtime User
Hi,

i have to alter too and set the field to an default value.

I did it this way:
B4X:
sql1.ExecNonQuery("ALTER TABLE LG ADD COLUMN JobArt TEXT")
sql1.ExecNonQuery("UPDATE LG SET JobArt = 'HA' ")

But is there a way to set the 'HA' in the 'ALTER TABLE' line too ?

Regards,
Hubert
 
Upvote 0
Top