Answers for "android sqlite insert or replace"

0

android sqlite insert or replace

SQLiteDatabase db=this.getWritableDatabase();
ContentValues cv=new ContentValues();
        cv.put("columName1",YOUR_VAR);
        cv.put("columName2",YOUR_VAR);
        cv.put("columName3",YOUR_VAR);
int response=db.update("YourTable",cv,"columName = ?"+ new String[]{YOUR_VAR})
  if(response==0){
    db.insert("Your_table",null,cv);
  }
Posted by: Guest on December-15-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language