
数据库
文章平均质量分 80
lele892207980
这个作者很懒,什么都没留下…
展开
-
hsqldb 内存模式
1、下载hsqldb数据库,我用的是hsqldb-2.2.9.zip解压后,将hsqldb中的lib目录下的hsqldb.jar文件拷贝到自己项目的lib目录下。内存模式:2、 链接内存库 并建表 // 加载HSQL DB的JDBC驱动 Class.forName("org.hsqldb.jdbcDriver");原创 2012-08-16 11:46:55 · 3983 阅读 · 2 评论 -
exists 和 in 的区别
hql1: delete Revision r where exists (select f from File f where f.fileState='2' and f.uid=r.file.uid)等同于hql2: delete Revision r where r.uid in (select f from File f where f.fileState=原创 2012-07-26 13:09:45 · 292 阅读 · 0 评论 -
mysql常用操作
1、增加了密码后的登录格式如下: mysql -u root -p访问其他计算机数据库:mysql -h计算机ip -u用户名 -p密码 eg:mysql -h127.0.0.1 -uroot -ppassword 注意:一般root用户不允许从远程登录。只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mys原创 2012-07-25 10:50:48 · 289 阅读 · 0 评论 -
sql中 limit 和 top
如果要查询上述结果中前6条记录,则相应的SQL语句是SQL Server> select top 6 id from tablename ;mysql> select id from tablename limit 6;如果要查询上述结果中第 7 条到第 9 条记录,则相应的SQL语句是:SQL Server> select top 3 id from tablena翻译 2017-05-08 14:59:49 · 3166 阅读 · 0 评论