是否可以在sqlite中的单个语句中更改表添加MULTIPLE列?以下不起作用.
alter table test add column mycolumn1 text, add column mycolumn2 text;
如何在现有表 LOGIN 中添加列。这是我的示例代码。
这是我的 DataBaseAdapter 类:
public class DataBaseHelper extends SQLiteOpenHelper
{
public DataBaseHelper(Context context, String name,CursorFactory factory, int version)
{
super(context, name, factory, version);
}
// Called when no database exists in disk and the helper class needs
// to create a new one.
@Override
public void onCreate(SQLiteDatabase _db)
{
_db.execSQL(LoginDataBaseAdapter.DATABASE_CREATE);
}
// Called when there is a database version mismatch meaning that the version
// of the database on disk needs to be upgraded to the current version. …Run Code Online (Sandbox Code Playgroud)