I have two table's table as follows:
Names :-
id firstname lastname, address, phone
Now, i have another table which contains lets say location data for person's in first table
Location :-
id latitude, longitude
now , i have to select, firstname, latitude, longitude only using sql/sqlite query.
Currently, my query is :-
Names nameTable INNER JOIN Location locationTable ON nameTable .id =locationTable .id WHERE nameTable .id=12
This query i use in android sqlite and it returns me full table.
I want specific columns only to increase performance. Can anyone help me with the query ?
SELECT Names INNER JOIN Location ON Names.id = Locations.id WHERE Names.id = 12should work, if id is UNIQUE.