Android examples for Database:SQL Query
create cache table in SQLiteDatabase
//package com.book2s; import android.database.sqlite.SQLiteDatabase; public class Main { public static void create(SQLiteDatabase paramSQLiteDatabase) { paramSQLiteDatabase//from w ww . ja v a 2 s . c o m .execSQL("CREATE TABLE cache_file('id' INTEGER PRIMARY KEY NOT NULL ,first_name TEXT,last_name TEXT,clean_time DATETIME DEFAULT CURRENT_TIMESTAMP,dir_path TEXT,dir_space INTEGER)"); paramSQLiteDatabase .execSQL("CREATE INDEX clean_time_index ON cache_file(clean_time)"); paramSQLiteDatabase .execSQL("CREATE INDEX name_index ON cache_file(first_name, last_name)"); } }