How to find out if the record in the database?

How do I know if this entry in the SQLITE DB?
There is for example a request
SELECT EXISTS(SELECT * FROM sharetable WHERE the name field in the table = "+ data + " LIMIT 1);

which in the absence of this content in the table field displays 0 , otherwise 1. How to execute such a query in Android.
because the command db.execSQL();
returns no results. and I would like to know passing the cursor!
July 8th 19 at 11:38
1 answer
July 8th 19 at 11:40
and I would like to know passing the cursor!
- and what are the causes?
Because all information from the database(in the case of Android) is returned as a cursor.
To keep the entire database to find a value in database or not. - Jake.Balistreri commented on July 8th 19 at 11:43
: how do you know if the record is not prosherstiv the entire database? Except caching. - casandra.Kemmer commented on July 8th 19 at 11:46
: wanted sql query I got the result - Jake.Balistreri commented on July 8th 19 at 11:49
: what kind of stupidity? whichever way you did not get an answer - be it a cursor or an array, or something else, the database will still need to make a selection based on certain conditions. or stupid to write in SharedPreferences to true after you add a record and check on it - Pedro_Herzog commented on July 8th 19 at 11:52

Find more questions by tags Android