0

In android apps we are using multiple databases (Sqlite). we need to use join query with two different tables from different databases. Can anybody have idea about this? If it is then can u please send the sample query for join two tables from different database?

Thanks Krishna

mindus
  • 209
  • 2
  • 12
  • http://www.sqlite.org/lang_attach.html – max Nov 11 '13 at 12:06
  • possible duplicate of [SQLite - How do you join tables from different databases?](http://stackoverflow.com/questions/6824717/sqlite-how-do-you-join-tables-from-different-databases) – JRomero Nov 11 '13 at 12:14

1 Answers1

1
attach database 'databaseObj1.db' as dbObj1;
attach database 'databaseObj2.db' as dbObj2;

select
  *
from
  dbObj1.Table1 a
inner join 
  dbObj2.Table2 b on b.Column = a.Column;
LS_ᴅᴇᴠ
  • 10,823
  • 1
  • 23
  • 46
Nagaraja
  • 581
  • 1
  • 4
  • 12