我今天在我的 oracle 数据库上看到了一件奇怪的事情。
SQL> select tablespace_name, table_name from user_tables;
TABLESPACE_NAME |TABLE_NAME
------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SYSTEM |lavoratori2
1 riga selezionata.
Passati: 00:00:00.07
SQL> drop table lavoratori2 purge;
drop table lavoratori2 purge
*
ERROR at line 1:
ORA-00942: table or view does not exist
Passati: 00:00:00.03
我以非 sys 用户的身份尝试过这个,现在我以 SYS 身份尝试......同样的事情。
SQL> select tablespace_name, table_name from all_tables where table_name ='lavoratori2';
TABLESPACE_NAME
------------------------------
TABLE_NAME
--------------------------------------------------------------------------------
SYSTEM
lavoratori2
SQL> drop table lavoratori2;
drop table lavoratori2
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>
怎么解决?
我试图清空垃圾桶,但不朽的桌子仍然存在
SQL> purge recyclebin;
Recyclebin purged.
SQL> select tablespace_name, table_name from all_tables where table_name ='lavoratori2';
TABLESPACE_NAME
------------------------------
TABLE_NAME
--------------------------------------------------------------------------------
SYSTEM
lavoratori2
另一个奇怪的事情..
SQL> select * from lavoratori2;
select * from lavoratori2
*
ERROR at line 1:
ORA-00942: table or view does not exist
如果我这样做了
select * from "lavoratori2";
返回
ORA-00942: table or view does not exist
如果我这样做了
SQL> select owner from all_tables where table_name ='lavoratori2';
返回作为表所有者的非 sys 用户的正确名称。