17,382
社区成员




SQL> select table_name from user_tables
2 /
TABLE_NAME
------------------------------
PHOTOS
BIN$laxNd1+QTBiqfzJFAFnFzg==$0
USER_ALBUM
ALBUM_TYPE
USERS
SQL> desc BIN$laxNd1+QTBiqfzJFAFnFzg==$0
SP2-0565: Illegal identifier.
SQL>
--这样都是可以的
C:\>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 6 12:07:51 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
请输入用户名: sys as sysdba
输入口令:oracle
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> quit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:\>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 6 12:08:00 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
请输入用户名: sys
输入口令:oracle as sysdba
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> quit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:\>
--oracle回收站与操作系统回收站类似,删除表时只将
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> --显示回收部内容
SQL> show recyclebin;
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T BIN$SBhS0I84RgOXIoL15UveTQ==$0 TABLE 2011-05-29:12:39:33
SQL>
SQL> --t表在回收站,但不能直接用t
SQL> desc t;
ERROR:
ORA-04043: 对象 t 不存在
SQL> --t表在回收站,用在回收站中的名称查询(注意另双引号)
SQL> desc "BIN$SBhS0I84RgOXIoL15UveTQ==$0"
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
MAX NUMBER
VAL NUMBER
SQL> --从回收站中恢复表
SQL> flashback table t to before drop;
闪回完成。
SQL> --恢复成功,查看结构
SQL> desc t1;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
ID VARCHAR2(10)
PASS VARCHAR2(20)
SQL> --查看数据
SQL> select * from t1;
ID PASS
---------- --------------------
abc
ccc