Skip to content Skip to sidebar Skip to footer

Error On Select*from Statement Android Sqlite Database

I have a Database With a foreign key I am using the SELECT * FROM statement but I keep getting an error when I try to view the database. SELECT * FROM STATEMENT private final Stri

Solution 1:

Your where clause references an object called Table which you haven't got in your FROM clause. Also, there's not much point in aliasing your tables if you're not using the aliases..

I'm guessing it should be:

privatefinalStringMY_QUERY="SELECT * FROM wwTable INNER JOIN wwTimeTable ON wwTable._id=wwTimeTable.mName WHERE wwTable._id=wwTimetable.mForeign"; 

Solution 2:

Remove the mLat after the wwTable in the from statement.

Correct syntax is: select * from table inner join other_table ...

Post a Comment for "Error On Select*from Statement Android Sqlite Database"