-4

How can I learn whether a particular name is present in my table, and and in which row (row number) it is present?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179

1 Answers1

0

I don't know your database structure but here is the simple examples

Cursor c = database.query(TABLE,new String[]{_ID,NAME},NAME + "in(" + queryName + ")",null,null,null};

now this will return those rows whose name are match with the queryName and queryName contains like ('abc','pqr'), now in the second argument I have pass the column name first is ROW ID and another is NAME now go through the iterator.

Pratik
  • 30,639
  • 18
  • 84
  • 159