日期:2014-05-16  浏览次数:20332 次

Oracle自用指令
【修改列】
alter table table_name add [constraint 约束名] 约束条件(column);
如not null:
alter table table_name modify(col type not null);
?
?
【删除列】
alter table emp01 drop column dno;
?
?
【增加列】
alter table table_name add( column datatype [default expr][,column datatype...]);
【删除索引】
DROP INDEX index_name
?
?
【显示执行计划】
set autotrace on explain;

显示执行计划,并执行语句

set autotrace traceonly explain;
只显示执行计划,不执行语句,对于仅仅查看大表的Explain Plan非常管用。
set autotrace traceonly;
同set autotrace on 只是不显示查询输出
set autotrace on statistics;
只显示统计信息
【显示执行计划】
select * from aa where date1>to_date('2008-08-08','yyyy-mm-dd')
日期比较