My brain does not seem to be able to function properly today. I can think of many ways to do what I want to do but none of them I like.
I will describe the problem in the most symplistic form. I have two tables. The first table, has a row which includes an 'id' pointing to a row of another table. create table config (profile_id integer, other_configs int ); The second table is defined as follows: create table profile (id integer primary key autoincrement, name varchar(32) unique, magic_number int); Every entry in 'profile' should be unique. I would like to be able to update (or insert if it does not exist) profile with a new 'magic_number' while keeping the same 'id' or updating the new 'id' in 'config' table. What is the simplest way (and most efficient) to achieve this ? Regards, Mario Hebert Legerity