Невозможно создать таблицу TEMP в Android sqlite

Я попытался создать временную таблицу (sqlite) в Android

Вот фрагмент кода:

// No error - But cannot create TEMP table
database.rawQuery("CREATE TEMP TABLE IF NOT EXISTS tt1 (unread_message int, target varchar)", null);

// Error - android.database.sqlite.SQLiteException: no such table: tt1: , while compiling: INSERT INTO tt1 SELECT count(*), target  FROM messages where read_status=0 and direction=1 GROUP BY target
database.rawQuery("INSERT INTO tt1 SELECT count(*), target  FROM messages where read_status=0 and direction=1 GROUP BY target", null);

Нет ошибки для создать запрос TEMP TABLE, но он жалуется, что tt1 не существует во втором запросе. Я неправильно создал таблицу TEMP?

7
задан Daniele 23 March 2012 в 15:19
поделиться