OCP 1Z0 052 177

来源:互联网 发布:淘宝店怎么提升流量 编辑:程序博客网 时间:2024/04/29 20:53
177. Which three statements are correct about temporary tables? (Choose three.) 
A.Indexes and views can be created on temporary tables. 
B.Both the data and the structure of temporary tables can be exported. 
C.Temporary tables are always created in a user's temporary tablespace. 
D.The data inserted into a temporary table in a session is available to other sessions. 
E.Data manipulation language (DML) locks are never acquired on the data of temporary tables. 
Answer: ACE


临时表数据存放临时表空间
SQL> drop table test purge;Table droppedSQL> CREATE GLOBAL TEMPORARY TABLE TEST AS SELECT * FROM dba_objects where 1=2;Table createdSQL> insert into test select * from dba_objects;86822 rows insertedSQL> SELECT username, session_num, segtype, blocks FROM v$tempseg_usage;USERNAME                       SESSION_NUM SEGTYPE       BLOCKS------------------------------ ----------- --------- ----------TEST                                   247 DATA             128TEST                                    33 DATA             128TEST                                    33 DATA            12803 rows selected

可以建view,index
SQL> create or replace view v_test as select * from test;View createdSQL> create index idx_test on test(object_id);Index created

B 临时表有会话级与事物级,均是不同会话间的数据不可见。所以无法exp

D 临时表不同会话间的数据不可见

E 因数据互不可见,当然也就没有锁

Temporary Tables

Oracle Database temporary tables hold data that exists only for the duration of a transaction or session. Data in a temporary table is private to the session, which means thateach session can only see and modify its own data.

Temporary tables are useful in applications where a result set must be buffered. For example, a scheduling application enables college students to create optional semester course schedules. Each schedule is represented by a row in a temporary table. During the session, the schedule data is private. When the student decides on a schedule, the application moves the row for the chosen schedule to a permanent table. At the end of the session, the schedule data in the temporary data is automatically dropped.

0 0
原创粉丝点击