我正试图将我的数据储存在记忆中。
这里,我现在有权这样做。
//sq lite driver
Class.forName("org.sqlite.JDBC");
//database path, if it s new data base it will be created in project folder
con = DriverManager.getConnection("jdbc:sqlite:mydb.db");
Statement stat = con.createStatement();
stat.executeUpdate("drop table if exists weights");
//creating table
stat.executeUpdate("create table weights(id integer,"
+ "firstName varchar(30)," + "age INT," + "sex varchar(15),"
+ "weight INT," + "height INT,"
+ "idealweight INT, primary key (id));");
现在,如果要把这一数据存储在记忆中,数据应当保存到删除之前。
增 编