Thanks a lot!
Andrzej Lisowski, March 20, 2017 - 11:55 am UTC
Hi Chris!
Thanks a lot for so quick answer!
I'm aware that I can use "DROP UNUSED COLUMNS" but I was curious if this is a bug or a "feature" ;-)
We'll open a SR in Metalink in order to correct this unintended I guess behavior.
Kind regards,
Andrzej
March 20, 2017 - 2:47 pm UTC
I'm not aware of anything in 12c that would need this "feature". So, yes please raise an SR!
seems to be a bug in 12c
Rajeshwaran, March 20, 2017 - 12:20 pm UTC
This looks like a bug in 12c.
Below demo is from 11g(11.2.0.4) and 12c (12.2.0.1) database.
demo@ORA11G> create table t(x int,y int);
Table created.
demo@ORA11G> insert into t values(1,1);
1 row created.
demo@ORA11G> column column_name format a10
demo@ORA11G> select column_name,hidden_column
2 from user_tab_cols
3 where table_name ='T';
COLUMN_NAM HID
---------- ---
X NO
Y NO
demo@ORA11G> alter table t add(b1 date not null,b2 number);
alter table t add(b1 date not null,b2 number)
*
ERROR at line 1:
ORA-01758: table must be empty to add mandatory (NOT NULL) column
demo@ORA11G> select column_name,hidden_column
2 from user_tab_cols
3 where table_name ='T';
COLUMN_NAM HID
---------- ---
X NO
Y NO
demo@ORA11G>
no new columns in 11g, when running this against 12c got this.
demo@ORA12C> column column_name format a30
demo@ORA12C> select column_name,hidden_column
2 from user_tab_cols
3 where table_name ='T';
COLUMN_NAME HID
------------------------------ ---
X NO
Y NO
SYS_C00003_17032017:46:23$ YES
SYS_C00004_17032017:46:23$ YES
demo@ORA12C>