Java tutorial
//package com.java2s; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class Main { private static final String TASK_TABLE_NAME = "task"; private static final String NAME = "name"; private static Cursor getTaskCursor(SQLiteDatabase database, String name) { String where = NAME + "='" + name + "'"; Cursor cursor = database.query(TASK_TABLE_NAME, null, where, null, null, null, null); return cursor; } }