Bo's Oracle Station

查看: 2394|回复: 0

【多图杀猫】课程第13次(2016-04-25星一期):集操作符,DML,旧值和读一致性

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-4-26 10:13:45 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-5-4 09:40 编辑

课程第13次(2016-04-25星期一):集操作符,DML,旧值和读一致性
【上完1Z0-051的第8章】:集操作符
【1Z0-051】:共9章
【1Z0-052】:共3章
2016-04-25.sql:
  1. select  * from job_history   order by 1,2;

  2. select  * from employees where employee_id=200;

  3. ---
  4. select  employee_id  , count(*)  from

  5. (SELECT employee_id, job_id
  6. FROM   employees
  7. UNION
  8. SELECT employee_id, job_id
  9. FROM   job_history)

  10. group by employee_id
  11. having  count(*) >=3;


  12. ----

  13. SELECT employee_id, job_id
  14. FROM   employees
  15. intersect
  16. SELECT employee_id, job_id
  17. FROM   job_history;

  18. ----

  19. SELECT employee_id
  20. FROM   employees
  21. MINUS
  22. SELECT employee_id
  23. FROM   job_history;

  24. ---

  25. SELECT location_id, department_name "Department",
  26.    'X'   "Warehouse location"  
  27. FROM departments
  28. UNION
  29. SELECT location_id,   'Y'   "Department2",
  30.    state_province
  31. FROM locations
  32. order by "Department2" ;


  33. create table t05108_a ( a  number ) ;

  34. insert into t05108_a values ( 3) ;




  35. insert into t05108_b values (2) ;
  36. insert into t05108_b values (3) ;


  37. create table t05108_b ( b number ) ;



  38. create table t05108_c ( c number ) ;

  39. insert into t05108_c values (3) ;

  40. select  * from t05108_a
  41. minus
  42. (select  * from t05108_b
  43. intersect
  44. select  * from t05108_c);

  45. ----
  46. select * from v$transaction;

  47. select  * from dba_rollback_segs;

  48. select  * from v$session where  terminal='pts/5';

  49. select  * from v$process;
  50. ---

  51. select   file_name,
  52.   bytes/1024/1024 from dba_temp_files where tablespace_name='TEMP';
  53.   
  54. alter tablespace temp add tempfile '/home/oracle/temp02.dbf' size 10G ;
  55. ---
  56. create undo tablespace undotbs2 datafile size 256K autoextend off;

  57. ---
  58. select  * from dba_rollback_segs;
复制代码

2016-04-25.txt:
  1. [oracle@station90 ~]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 25 21:42:07 2016

  3. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> show parameter undo

  7. NAME                                     TYPE         VALUE
  8. ------------------------------------ ----------- ------------------------------
  9. undo_management                      string         AUTO
  10. undo_retention                             integer         900
  11. undo_tablespace                      string         UNDOTBS1
  12. SQL> alter system set undo_tablespace=UNDOTBS2 ;

  13. System altered.

  14. SQL> drop tablespace  UNDOTBS1;

  15. Tablespace dropped.

复制代码


快照太旧

快照太旧
Screenshot2.png Screenshot3.png Screenshot.png Screenshot-2.png Screenshot-3.png Screenshot-4.png Screenshot-6.png Screenshot-7.png
Screenshot-1.png
Screenshot-5.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 02:52 , Processed in 0.033203 second(s), 27 queries .

快速回复 返回顶部 返回列表