Android Sqlite建表语句出错

//数据库建表
public static final String CREATE_USER_TABLE = "create table IF NOT EXISTS"
+ USER_TABLE + "("
+ _ID + " integer primary key autoincrement, "
+ USER_ID + " text, "
+ USER_NAME + " text, "
+ TOKEN + " text, "
+ TOKEN_SECRET + " text, "
+ DESCRIPTION + " text, "
+ USER_HEAD + " BLOB)";

                            出现错误了
                            android.database.sqlite.SQLiteException: near "EXISTSuserinfo": syntax error (code 1): , while compiling: create table IF NOT EXISTSuserinfo(_id integer primary key autoincrement, user_id text, user_name text, token text, token_secret text, description text, user_head BLOB)

1个回答

public static final String CREATE_USER_TABLE = "create table IF NOT EXISTS "
exists后面加个空格

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问