2016年5月11日

oracle 空值排序,排在最前面或者最后面

摘要: 1,排在最前面用order by name nulls first; eg:select t.name,t.code from table t where t.code!='1' order by name nulls first; 2,排在最后面order by name nulls last; 阅读全文

posted @ 2016-05-11 11:51 anlove 阅读(17233) 评论(0) 推荐(0) 编辑

2016年5月10日

SqlServer中批量update

摘要: 现在我有两张表分别是S_PERSON,S_USER S_PERSON S_USER 我现在想把S_USER表中的ACCOUNT批量修改成S_PERSON的ACCOUNT 我们可以发现S_USER表中有个跟S_PERSON表关联的字段 那就是PERSON_ID 这也是我们要update的条件 找到这个 阅读全文

posted @ 2016-05-10 18:17 anlove 阅读(17377) 评论(0) 推荐(0) 编辑

MyEclipse 比较常用的快捷键

摘要: Ctrl+D: 删除当前行 Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了) Alt+↑ 当前行和上面一行交互位置(同上) Alt+← 前一个编辑的页面 Alt+→ 下一个编辑的页面(当然是针对上面那条来说了) Ctrl+L 定位在某行 Ctrl+/ 注释当前行,再按则取消 阅读全文

posted @ 2016-05-10 16:32 anlove 阅读(183) 评论(0) 推荐(0) 编辑

清空表空间的方法

摘要: --删除用户 drop user 用户名 cascade; commit; --创建用户 (指定默认表空间 和 临时表空间 指定连接状态) CREATE USER 用户名 PROFILE DEFAULT IDENTIFIED BY 密码 DEFAULT TABLESPACE 表空间 TEMPORAR 阅读全文

posted @ 2016-05-10 16:29 anlove 阅读(2943) 评论(0) 推荐(0) 编辑

HQL语句中的join fetch

摘要: from Paper as paper join fetch paper.authors as authors where authors.id='xxxx'; from Paper as paper join fetch paper.authors where paper.authors.id=' 阅读全文

posted @ 2016-05-10 16:25 anlove 阅读(8250) 评论(2) 推荐(0) 编辑

SQLServer 索引的使用情况

摘要: —在优化查询SQL语句,查看索引使用情况SQL语句: select db_name(database_id) as N'数据库名称', object_name(a.object_id) as N'表名', b.name N'索引名称', user_seeks N'用户索引查找次数', user_sc 阅读全文

posted @ 2016-05-10 16:23 anlove 阅读(2891) 评论(0) 推荐(0) 编辑

导航