- 最后登录
- 2012-6-13
- 在线时间
- 10 小时
- 威望
- 18
- 金钱
- 213
- 注册时间
- 2011-12-26
- 阅读权限
- 10
- 帖子
- 19
- 精华
- 1
- 积分
- 18
- UID
- 120
|
6#
发表于 2012-4-18 14:06:06
scott@MYDB SQL> create table mytest as select rownum id,OBJECT_NAME,OBJECT_ID,STATUS from dba_objects;
Table created.
scott@MYDB SQL>
scott@MYDB SQL> create index idx_mytest_status on mytest(status);
Index created.
scott@MYDB SQL>
scott@MYDB SQL> alter table mytest modify status not null;
Table altered.
scott@MYDB SQL>
scott@MYDB SQL>
scott@MYDB SQL> desc mytest;
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
ID NUMBER
OBJECT_NAME VARCHAR2(128)
OBJECT_ID NUMBER
STATUS NOT NULL VARCHAR2(7)
scott@MYDB SQL>
scott@MYDB SQL>
scott@MYDB SQL> exec dbms_stats.gather_table_stats(user,'mytest',cascade=>true);
PL/SQL procedure successfully completed.
scott@MYDB SQL>
[ 本帖最后由 几番风雨 于 2012-4-18 14:14 编辑 ] |
|