> On Aug 28, 2018, at 11:30 AM, Joe <[email protected]> wrote: > > A (perhaps silly ) beginners question: > My sqlite database contains several tables, two of them, table A and table B, > have text colums called 'nam'. The tables have about 2 millions lines. > What's the most efficient way to select all lines from table A with nam > values, which are not present in the nam values of table B? > Thanks — Joe
Not sure about performance vs other suggestions, but this is a common way of doing that: SELECT a.* FROM a LEFT JOIN b USING (nam) WHERE b.nam IS NULL -j _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

