Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android sqlite select query

SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.rawQuery("SELECT column1,column2,column3 FROM table ", null);
if (c.moveToFirst()){
    do {
        // Passing values 
        String column1 = c.getString(0);
        String column2 = c.getString(1);
        String column3 = c.getString(2); 
        // Do something Here with values
    } while(c.moveToNext());
}
c.close();
db.close();
Comment

PREVIOUS NEXT
Code Example
Java :: java not equals string 
Java :: java sum of array elements 
Java :: java string not equal 
Java :: java run code at interval 
Java :: java scan a file 
Java :: how to print byte array in java 
Java :: create array of particular length in java 
Java :: get device token firebase 
Java :: java running sum of array 
Java :: java swing set icon to JFrame 
Java :: java wait(timeout) 
Java :: arraylist .set java 
Java :: read timed out android studio 
Java :: java add elements array 
Java :: generic list java 
Java :: number format java 
Java :: java standard exception 
Java :: restart java windows 
Java :: gat environment variables java 
Java :: @crossorigin spring allow all 
Java :: how to remove all characters before a certain character from a string in java 
Java :: pre increment and post increments java 
Java :: read stream java 
Java :: public class in java 
Java :: java arrayList of array to array of array 
Java :: Quick Sort Java Implementation 
Java :: arraylist index java 
Java :: jdk 15 download brew 
Java :: print statement in java 
Java :: java how to print out a string in uppercase 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =