package com.example.myapplication; public class costList { private String _id; private String se; private String Title; private String Date; private String Money; public String getMoney() { return Money; } public void setMoney(String money) { Money = money; } public String getDate() { return Date; } public void setDate(String date) { Date = date; } public String getTitle() { return Title; } public void setTitle(String title) { Title = title; } public String get_id() { return _id; } public void set_id(String _id) { this._id = _id; } public String getSe() { return se; } public void setSe(String se) { this.se = se; } }
package com.example.myapplication; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DBHelper extends SQLiteOpenHelper { private static int DB_VERSION = 1; private static String DB_NAME = "account_daily2.db"; public DBHelper(Context context) { super(context, DB_NAME ,null, DB_VERSION); } @Override public void onCreate(SQLiteDatabase db) { String sql="create table account2(_id integer primary key autoincrement," +//主键 "Se varchar(20),"+// "Title varchar(20)," +//Title "Date varchar(20)," +//Date "Money vaechar(20))";//Money db.execSQL(sql); } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { } }标签:String,Title,void,private,public,id,2.11 From: https://www.cnblogs.com/luoqingci/p/18040460