Re: [sqlite] primary key autoincrement updation problem in caserefereced

2012-01-11 Thread Durga D
Thanks Igor. >>You seem to be under impression that a FOREIGN KEY >>constraint somehow magically pulls a value from >>referenced table. correct. so, first I need to insert in t0 table, then query for value from t0, then update t1 with this value. Needs to avoid reading from t0 table. Is

Re: [sqlite] primary key autoincrement updation problem in caserefereced

2012-01-11 Thread Igor Tandetnik
Durga D wrote: > create table if not exists t0 ( h integer primary key autoincrement, t0info > text); > create table if not exists t1 ( i integer primary key autoincrement, t1info > text, hh integer not null, unique(i, hh), foreign key (hh) references t0 > (h) ); The UNIQUE