简体   繁体   中英

Android SQLite search a column

I have code that gives me a number, and I have an Android SQLite table.

The first column has a lots of numbers and I need to compare the number that I got from the code to these numbers in the table and find the one that matches my number that I got from the code. Once I find it, I need to update the row.....

what is the best way to do it.....?

Your question lacks details, like the name of the column holding the number value and the column(s) being updated when the record is found, but you'll be using something that resembles:

UPDATE your_table
   SET column_1 = ?,
       column_2 = ?
 WHERE number_column = number_from_code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM