摘要: 遇到上述问题,可能是自己的查询语句复杂了。 阅读全文
posted @ 2013-06-02 21:21 江湖道士 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 记录之间有重复的话,可以“三个表”联合使用union;union ....union ....uinion ..... 阅读全文
posted @ 2013-06-02 21:10 江湖道士 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 注意事项,它是按照数据的插入顺序进行排序的,而不是按照你的想法去排序,有时看查到的顺序“颠三倒四”也是很正常的。这是要利用“子查询(先进行排序)”;select rwnum,ename,sal from (select * from emp order by sal) where rownum<4; 阅读全文
posted @ 2013-06-02 20:18 江湖道士 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1多个数据的合并union:create view vw_sal3 asselect * from (select * frm vw_sal union select * from vw_sal2);2多条件查询 () select ename,job,deptno,sal from emp where (deptno,sal ) in (select * from vw_sal3)3 oracle系统自带的数据库dual查询时间:select sysdate from dual; 4 查询orcle内所有已建的表select * from cat;5 rownum 只能和<搭配使用,不 阅读全文
posted @ 2013-06-02 16:53 江湖道士 阅读(248) 评论(0) 推荐(0) 编辑
摘要: group by 一般用在结尾 ,where 语句group 语句一般是由两个变量组成,多个变量会造成无法创建,因为所依据的变量过多。not in, 括号等的作用示例select部门号,max(成绩)as成绩fromEmployeewhere(部门号,成绩)notin(select*fromtemp_v1)groupby部门号; 阅读全文
posted @ 2013-06-02 12:07 江湖道士 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 看提示错误,有的放矢。 阅读全文
posted @ 2013-06-02 10:54 江湖道士 阅读(69) 评论(0) 推荐(0) 编辑
摘要: alter user scott/tigger account unlock;解锁状态下才可进入数据库,处理数据; 阅读全文
posted @ 2013-06-02 10:53 江湖道士 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 监听服务器要与服务器同时启动打开“服务”界面,启动“监听服务器”--oraclehome92TNSlistener; 阅读全文
posted @ 2013-06-02 10:51 江湖道士 阅读(180) 评论(0) 推荐(0) 编辑