OCP考試題庫-IZ0-052 第10題
Examine the following statement that is used to modify the primary key constraint on the SALES
table:
SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;
Which three statements are true regarding the above command? (Choose three.)
A.The constraint remains valid.
B.The index on the constraint is dropped.
C.It allows the loading of data into the table using SQL *Loader.
D.New data conforms to the constraint, but existing data is not checked.
E.It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.
正確答案: ABC
DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_subpart clause of the ALTER TABLE statement or using SQL*Loader. All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed
大意是說DISABLE VALIDATE會disable鍵並刪除在 constraint上的索引,同時, constraint還是valid。這個特性在資料倉儲的環境中特別有用。因為當載入大量資料時,沒有索引,可以節省很大的空間(也省去了維護索引的資源)。
這個設定允許使用從非分割槽表中通過分割槽交換向分割槽表中載入資料。其他所有DML雲集對錶的修改都不允許。
SQL> create table test2 as select * from test1;
Table created.
SQL> alter table test2 add constraint pk_test2 primary key (pid);
Table altered.
SQL> alter table test2 modify constraint pk_test2 disable validate;
Table altered.
table:
SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;
Which three statements are true regarding the above command? (Choose three.)
A.The constraint remains valid.
B.The index on the constraint is dropped.
C.It allows the loading of data into the table using SQL *Loader.
D.New data conforms to the constraint, but existing data is not checked.
E.It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.
正確答案: ABC
DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_subpart clause of the ALTER TABLE statement or using SQL*Loader. All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed
大意是說DISABLE VALIDATE會disable鍵並刪除在 constraint上的索引,同時, constraint還是valid。這個特性在資料倉儲的環境中特別有用。因為當載入大量資料時,沒有索引,可以節省很大的空間(也省去了維護索引的資源)。
這個設定允許使用從非分割槽表中通過分割槽交換向分割槽表中載入資料。其他所有DML雲集對錶的修改都不允許。
SQL> create table test2 as select * from test1;
Table created.
SQL> alter table test2 add constraint pk_test2 primary key (pid);
Table altered.
SQL> alter table test2 modify constraint pk_test2 disable validate;
Table altered.
SQL> update test2 set pid = 20;
update test2 set pid = 20
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (SCOTT.PK_TEST2)
disabled and validated
SQL> select index_name from user_indexes where table_name='TEST2';
no rows selected
可以看到,在disable validate的情況下,不允許對存在約束的列進行修改操作。同時,約束(這個例子為主鍵)的索引也不復存在(被刪除了)。
update test2 set pid = 20
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (SCOTT.PK_TEST2)
disabled and validated
SQL> select index_name from user_indexes where table_name='TEST2';
no rows selected
可以看到,在disable validate的情況下,不允許對存在約束的列進行修改操作。同時,約束(這個例子為主鍵)的索引也不復存在(被刪除了)。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2040194/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- OCP考試題庫-185題
- OCP 063中文考試題庫(cuug內部資料)第45題
- OCP 063中文考試題庫(cuug內部資料)第46題
- OCP 063中文考試題庫(cuug內部資料)第37題
- OCP 063中文考試題庫(cuug內部資料)第38題
- OCP 063中文考試題庫(cuug內部資料)第39題
- OCP 063中文考試題庫(cuug內部資料)第40題
- OCP 063中文考試題庫(cuug內部資料)第33題
- OCP 063中文考試題庫(cuug內部資料)第41題
- OCP 063中文考試題庫(cuug內部資料)第42題
- OCP 063中文考試題庫(cuug內部資料)第43題
- OCP 063中文考試題庫(cuug內部資料)第44題
- oracle ocp 19c考題10,科目082考試題 - shared server dispatchersOracleServer
- oracle ocp 19c考題,科目082考試題-temporary undoOracle
- oracle ocp 19c考題,科目082考試題-Oracle NetOracle
- oracle ocp 19c考題,科目082考試題-INTERSECT operatorOracle
- ocp 19c考題,科目082考試題(28) - oracle profilesOracle
- oracle ocp 19c考題,科目082考試題(18)-unused columnOracle
- oracle ocp 19c考題7,科目082考試題-listener tnsnamesOracle
- oracle ocp 19c考題,科目082考試題-date/time functionsOracleFunction
- ocp 19c考題,科目082考試題(31) - resource_limitMIT
- ocp 19c考題,科目082考試題(25)- instance situations
- oracle ocp考試程式的登入問題Oracle
- oracle ocp 19c考題,科目082考試題(19)-set unused columnOracle
- oracle ocp 19c考題,科目082考試題(20)-set unused columnOracle
- ocp 19c考題,科目082考試題(14)-starting with the letter D
- MySQL OCP 8.0 認證1Z0-809考試題庫MySql
- 【每日一練】Oracle OCP認證考試題庫解析052-1Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-2Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-3Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-4Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-5Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-6Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-7Oracle
- 【每日一練】Oracle OCP認證考試題庫解析052-8Oracle
- 10G ocp 題庫
- MySQL 8.0 OCP 1Z0-908認證考試題庫1MySql
- oracle ocp 19c考題8,科目082考試題-logical and physical database structuresOracleDatabaseStruct