views:

133

answers:

1

I would like to do an inner join on my database in my Android app. Is this even possible? What about a left join? I know cursor joiner exists but the documentation isn't clear at all. Can anyone provide any further insight?

Thanks

+1  A: 

You'll do joins in the SQL expression itself. It's documented here: http://www.sqlite.org/lang_select.html. There's support for left joins, but not right joins (which doesn't really matter - you just switch the arguments around).

EboMike
thanks i'll test this out later
2Real
thanks i figured out how to do it with a raw query can't believe i didn't see it sooner
2Real
Haha... I said that about so many other things.. "can't believe I didn't see it sooner!" :) SQL is powerful, you definitely wanna keep your logic there. Especially since the entire result will be stored in memory in the Cursor, so the more you can filter out earlier, the better.
EboMike