sqlite查询中的语法错误?

Duy*_*guK 1 sqlite android

我总是得到这个错误.我认为查询是好的.什么是问题?

"引起:android.database.sqlite.SQLiteException:near"to":语法错误:,同时编译:创建表消息(_id整数,msgdesc文本,日期时间戳不为空,由整数非空创建,为非整数非空); "

这是我的代码:

public class ContactListDB extends SQLiteOpenHelper {


private static final int DATABASE_VERSION = 2;
private static final String DATABASE_NAME = "MobileMerch";

// Database creation SQL statement
private static final String CREATE_MERCH  = "create table Merchendiser" +
        "(_id integer primary key, name text not null,surname text not null,username text not null);";

// Database creation SQL statement
private static final String CREATE_MESSAGES = "create table Messages" +
        "(_id integer , msgdesc text ,date timestamp  not null, createdby integer not null, to integer not null);";



public ContactListDB(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
}    

public void onCreate(SQLiteDatabase db) {

    db.execSQL(CREATE_MERCH);
    db.execSQL(CREATE_MESSAGES);


}
Run Code Online (Sandbox Code Playgroud)

lc.*_*lc. 5

TO是一个保留字.重命名您的列(推荐)或通过将其括在双引号(例如"to")中来逃避它.

另见:http://www.sqlite.org/lang_keywords.html