|
本帖最后由 botang 于 2016-5-4 09:40 编辑
课程第13次(2016-04-25星期一):集操作符,DML,旧值和读一致性
【上完1Z0-051的第8章】:集操作符
【1Z0-051】:共9章
【1Z0-052】:共3章
2016-04-25.sql:
- select * from job_history order by 1,2;
- select * from employees where employee_id=200;
- ---
- select employee_id , count(*) from
- (SELECT employee_id, job_id
- FROM employees
- UNION
- SELECT employee_id, job_id
- FROM job_history)
- group by employee_id
- having count(*) >=3;
- ----
- SELECT employee_id, job_id
- FROM employees
- intersect
- SELECT employee_id, job_id
- FROM job_history;
- ----
- SELECT employee_id
- FROM employees
- MINUS
- SELECT employee_id
- FROM job_history;
- ---
- SELECT location_id, department_name "Department",
- 'X' "Warehouse location"
- FROM departments
- UNION
- SELECT location_id, 'Y' "Department2",
- state_province
- FROM locations
- order by "Department2" ;
- create table t05108_a ( a number ) ;
- insert into t05108_a values ( 3) ;
- insert into t05108_b values (2) ;
- insert into t05108_b values (3) ;
- create table t05108_b ( b number ) ;
- create table t05108_c ( c number ) ;
- insert into t05108_c values (3) ;
- select * from t05108_a
- minus
- (select * from t05108_b
- intersect
- select * from t05108_c);
- ----
- select * from v$transaction;
- select * from dba_rollback_segs;
- select * from v$session where terminal='pts/5';
- select * from v$process;
- ---
- select file_name,
- bytes/1024/1024 from dba_temp_files where tablespace_name='TEMP';
-
- alter tablespace temp add tempfile '/home/oracle/temp02.dbf' size 10G ;
- ---
- create undo tablespace undotbs2 datafile size 256K autoextend off;
- ---
- select * from dba_rollback_segs;
复制代码
2016-04-25.txt:
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 25 21:42:07 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> show parameter undo
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- undo_management string AUTO
- undo_retention integer 900
- undo_tablespace string UNDOTBS1
- SQL> alter system set undo_tablespace=UNDOTBS2 ;
- System altered.
- SQL> drop tablespace UNDOTBS1;
- Tablespace dropped.
复制代码
快照太旧
|
-
-
|