Unable to drop a column in table. [message #624387] |
Mon, 22 September 2014 07:58 |
|
nmdivya@gmail.com
Messages: 12 Registered: September 2014
|
Junior Member |
|
|
Hi ,
I'm trying to drop a column from the table which I created.(I'm learning oracle now. Not official use).
SQL> alter table employee drop column emp_dept;
alter table employee drop column emp_dept
*
ERROR at line 1:
ORA-12988: cannot drop column from table owned by SYS
Can anyone help me to execute this query.
Thanks,
Snowy
|
|
|
|
|
|
|
|
Re: Unable to drop a column in table. [message #624404 is a reply to message #624395] |
Mon, 22 September 2014 10:22 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
A query like this should help you with Ed's suggestion:
SQL> SELECT OWNER, OBJECT_NAME, DBO.CREATED
FROM DBA_OBJECTS DBO, V$DATABASE V
WHERE TRUNC(DBO.CREATED) > TRUNC(V.CREATED);
HTH
-g
|
|
|
|
Re: Unable to drop a column in table. [message #624413 is a reply to message #624410] |
Mon, 22 September 2014 10:38 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
I agree, Michel. This is why I used the greater than sign and not ">=". Far better to leave existing non-SYS objects than delete required ones. Anyway, it was meant to be a clue for the OP to work out the rest. It depends how far he wants to go to unpick his mess.
|
|
|
|
|
Re: Unable to drop a column in table. [message #624428 is a reply to message #624427] |
Mon, 22 September 2014 12:16 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
EdStevens wrote on Mon, 22 September 2014 22:43Lalit Kumar B wrote on Mon, 22 September 2014 10:49The mess could be worse for amateurs in 12c release, and OP is on 12c.
I must be going blind, but I see no evidence of what version the OP is using.
I see it along with topic title(on top), "Oracle 12c, windows".
|
|
|
|