On 14 Sep 2018, at 6:50pm, Maziar Parsijani <[email protected]> wrote:
> I have 2 tables with the same rowid now I want to :
> select rowid from table1 where table1 like "%smth%"
> select * from table2 where rowid =(selected rows before)
>
> I mean if I could do it in a same query.
This is what JOIN is for.
SELECT * FROM table2
JOIN table1.rowid = table2.rowid
WHERE table1.name LIKE '%smth%'
Note that SQLite uses single quotes ' for text strings, not double quotes ".
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users