0
如何將以下命令寫入sqlitedatabase update()
函數?android SQLitedabase更新
String query="update " + TABLE_TASKS + " SET " + TASK_LEFT + "=CASE WHEN " + TASK_LEFT + ">= " + left +" THEN " + TASK_LEFT + "+2 ELSE " + TASK_LEFT + " END, " + TASK_RIGHT + "=" + TASK_RIGHT + " +2 WHERE " +TASK_RIGHT +" >= " + right;
基本上我想知道如何將多個條款和WHEN THEN
條款爲update()
功能?
http://stackoverflow.com/questions/9453651/conditional-update-in-sqlite – Anukool 2013-02-15 09:59:53
我想知道如何在android.database.sqlite.update()函數中做到這一點 – vikas 2013-02-15 10:09:02
你試着用execSql - public void execSQL(String sql) – Anukool 2013-02-15 10:17:13