jeudi 26 novembre 2015

Select a field from two tables in sqlite

I have a Sqlite Database with 2 tables, Table1 and Table2, both have a field "name", my goal is to display names that is similar to each table in a listview

Cursor mCursor = db.rawQuery("select * from table1 JOIN table2 ON table1.name = table2.name where table2.name LIKE '%" + txtSearch + "%'", null);

it only display the result in table2 :( please help

Aucun commentaire:

Enregistrer un commentaire