Java tutorial
//package com.java2s; import android.database.sqlite.SQLiteDatabase; public class Main { private static final String TABLE_NAME = "Item"; private static final String COLUMN_ID = "item_id"; private static final String COLUMN_STATE = "state"; public static boolean updateItemState(SQLiteDatabase db, Integer id, Integer new_state) { String update_query = "UPDATE " + TABLE_NAME + " SET " + COLUMN_STATE + " = " + new_state + " WHERE " + COLUMN_ID + " = " + id; db.execSQL(update_query); return true; } }