DataBaseoffce databaseoffce = new DataBaseoffce();
创建数据库
databaseoffce.createDatabas("csxhzsd", "c:");
databaseoffce.createDatabase("csxhzsd3", "c:");
选择数据库
databaseoffce.use("csxhzsd");
创建数据表
databaseoffce.createTable("csxha1", "csxh String, c1 Integer, b1 long , l1 short, m1 Integer");
databaseoffce.createTable("csxha2", "csxh String, c2 String, a35 long , ll short, ml Integer, mk1 short, mk2 String,lin9 double");
databaseoffce.createTable("csxha3", "csxh135 String,c22 String");
for(int i=0 ;i <500;i ++)
{ 插入数据
// System.out.println(i);
databaseoffce.insert("csxha1", "3 2 3 7 3");//0
databaseoffce.insert("csxha1", "5 3 53 57 52");//0
databaseoffce.insert("csxha1", "a 5 52 78 35");//0
}
for(int i=0 ;i < 500 ;i ++)
{
databaseoffce.insert("csxha2", "2 2 3 7 3 7 8 5");//0
databaseoffce.insert("csxha2", "abg 5 53 92 52 7 8 7");//0
databaseoffce.insert("csxha2", "3 3 52 78 35 9 11 9");//0
}---------------------------------------------
databaseoffce.use("csxhzsd")
System.out.println(databaseoffce.select("csxha2",null,"lin9=7 and c2=5 and ll=92 or c2=67 and ll=78 or c2=2 and not ml=3".trim()));
简单的sql语句
System.out.println(" ***************************************** ");
System.out.println(databaseoffce.select("csxha2",null,"lin9=7 and c2=5 and ll=92 or c2=67 and ll=78 or c2=2 and not ml=3".trim()));
System.out.println(" ***************************************** ");
databaseoffce.use("csxhzsd3");
删除数据库
databaseoffce.dropDatabase_jc("csxhzsd");//"csxh=100 or c2=30 or a35=1"
删除数据
databaseoffce.delete("csxha2","lin9=7");
删除表结构
databaseoffce.droptable("csxha2");
删除库结构
databaseoffce.dropDatabase_jc("csxhzsd");
内存数据库
专门针对于需要大量数据且查询次数多的情况下使用,请您多指点
作者 QQ 502905196