Hsqldb In Memory
程序员文章站
2022-05-24 17:52:20
...
public static void main(String[] args)
{
Connection connection;
try
{
Class.forName("org.hsqldb.jdbcDriver");
connection=DriverManager.getConnection("jdbc:hsqldb:mem:demodb","sa","");
Statement st=null;
ResultSet rs=null;
st=connection.createStatement();
String sql1="create table cuser(username varchar(10))";
String sql2="insert into cuser(username) values('wanjun')";
String sql3="select * from cuser";
st.executeUpdate(sql1);
st.executeUpdate(sql2);
rs=st.executeQuery(sql3);
while(rs.next())
{
System.out.println(rs.getString(1));
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
推荐阅读
-
Android模拟器"Failed To Allocate memory 8"错误如何解决
-
Windows中查看进程的资源消耗(cpu, Disk,Memory,NetWork)
-
PHP通过内置函数memory_get_usage()获取内存使用情况
-
细谈java同步之JMM(Java Memory Model)
-
mysql 开发基础系列11 存储引擎memory和merge介绍
-
名词解释:SDHC(High Capacity SD Memory Card)
-
mysql Sort aborted: Out of sort memory, consider increasing server sort buffer s
-
php运行提示:Fatal error Allowed memory size内存不足的解决方法
-
Windows中查看进程的资源消耗(cpu, Disk,Memory,NetWork)
-
codeforces 712B Memory and Trident