drop table YHEM_ODS
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table YHEM_ODS
(oid number,
odate date,
omount number
)read only
partition by range(odate)
(partition q1_2016 values less than (to_date('2016-04-01','yyyy-mm-dd')),
partition q2_2016 values less than (to_date('2016-07-01','yyyy-mm-dd')),
partition q3_2016 values less than (to_date('2016-10-01','yyyy-mm-dd'))read write,
partition q4_2016 values less than (to_date('2017-01-01','yyyy-mm-dd'))read write)
Table created.
insert into YHEM_ODS values(1,to_date('2016-01-20','yyyy-mm-dd'),100)
ORA-14466: Data in a read-only partition or subpartition cannot be modified. ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-14466
insert into YHEM_ODS values(1,to_date('2016-10-20','yyyy-mm-dd'),100)
1 row(s) inserted.
insert into YHEM_ODS values(1,to_date('2016-12-20','yyyy-mm-dd'),100)
1 row(s) inserted.
insert into YHEM_ODS values(1,to_date('2016-01-20','yyyy-mm-dd'),100)
ORA-14466: Data in a read-only partition or subpartition cannot be modified. ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-14466
select * from yhem_ods
| OID | ODATE | OMOUNT | 1 | 20-OCT-16 | 100 | 1 | 20-DEC-16 | 100 |
|---|
alter table YHEM_ODS modify partition q2_2016 read write
Table altered.
select partition_name,read_only from user_tab_partitions
| PARTITION_NAME | READ_ONLY | Q4_2016 | NO | Q1_2016 | YES | Q2_2016 | NO | Q3_2016 | NO |
|---|