Originally posted by xyz2000 Get the table name from dba_tables, then
drop table "table name";
Be careful with this!!
In my environments there are duplicate table names under different schemas. If you fail to specify the OWNER in the drop statement, you will drop whichever table has the public synonym, sometimes this can be (Elmer Fudd voice) vewy vewy bad, heh heh heh.
Originally posted by Mr.Hanky
If you fail to specify the OWNER in the drop statement, you will drop whichever table has the public synonym, sometimes this can be (Elmer Fudd voice) vewy vewy bad, heh heh heh.
MH
Absolute Crap...DDL always needs Owner.Object_Name, if not then it will do DDL on schema logged in and not using the public synonym which might be pointing to any other schema's object.
PS below
Code:
TEST:ABHAY> ed
Wrote file afiedt.buf
1* create table x(key number)
TEST:ABHAY> /
Table created.
TEST:ABHAY> create public synonym x for x;
Synonym created.
TEST:ABHAY> grant create table to test;
Grant succeeded.
TEST:ABHAY> conn test/test
Connected.
TEST:ABHAY> drop table x;
drop table x
*
ERROR at line 1:
ORA-00942: table or view does not exist
TEST:ABHAY> create table x(key number);
Table created.
TEST:ABHAY> drop table x;
Table dropped.
TEST:ABHAY> desc x
Name Null? Type
----------------------------------------------------- -------- --------
KEY NUMBER
TEST:ABHAY> desc abhay.x
Name Null? Type
----------------------------------------------------- -------- --------
KEY NUMBER
Did it drop using public synonym???
Abhay.
Last edited by abhaysk; 12-09-2003 at 04:12 AM.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Bookmarks