IT> Try IT> IT> select * from test where rowid in IT> (select rowid from test where name like 'value' IT> union all IT> select rowid from test where email like 'value');
That seems to work... explain query plan select * from test where rowid in (select rowid from test where name like "b%" union all select rowid from test where email like "b%"); 0|0|TABLE test USING PRIMARY KEY 0|0|TABLE test WITH INDEX test_name 0|0|TABLE test WITH INDEX test_email But why PRIMARY KEY is used before indexes? Or it isn't? And also I do have an "id integer primary key autoincrement" column in my table. So if in SQLite "rowid" can be used, "id" column is not needed any more? telega) ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------