Re: [sqlite] SQL for finding non-matching rows

2005-08-19 Thread Clark Christensen
Terrific! Thanks to all who replied. -Clark --- Kurt Welgehausen <[EMAIL PROTECTED]> wrote: > > select a from t1 where a not in (select b from t2) > > select a from t1 except select b from t2 > > or (SQLite v3 only) > > select a from t1 where not exists >(select b from t2 where

Re: [sqlite] SQL for finding non-matching rows

2005-08-19 Thread John LeSueur
Clark Christensen wrote: I've seen it described here before, but I can't seem to find it. select a from t1 where a not in (select b from t2); will find the resultset I'm looking for, and it seems OK when the resulting in () list is small (maybe < 1000). But it seems less than ideal when the r

Re: [sqlite] SQL for finding non-matching rows

2005-08-19 Thread Kurt Welgehausen
> select a from t1 where a not in (select b from t2) select a from t1 except select b from t2 or (SQLite v3 only) select a from t1 where not exists (select b from t2 where b = a) Which of these is fastest will probably depend on table size and indexing; you'll have to try them out.