N
N
newdancer2016-06-27 21:46:33
Android
newdancer, 2016-06-27 21:46:33

How can I find out if a given record exists in the database?

How can I find out if a given record exists in the SQLITE database?
For example, there is a request

SELECT EXISTS(SELECT * FROM sharetable WHERE название поле в таблице = " + данные + " LIMIT 1);

which in the absence of this content in the field of the table displays 0 , otherwise 1. How to perform a similar query in Android.
because the command db.execSQL();
returns no results. but I would like to know bypassing the cursor!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2016-06-28
@IceJOKER

but I would like to know bypassing the cursor!
- what are the reasons?
After all, all information from the database (in the case of Android) is returned as a cursor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question