Oracle SQL 语句一

创建一个跟表 A一样的结构表B 并且复制所有的数据

create table test_Info as select * from sic_ia_corpration_security

 

创建一个跟表 A一样的结构表B ,只复制结构,不复制数据

create table test_Info as select * from sic_ia_corpration_security where 1=2

截断表中的数据

truncate table  test_Info

向表A 插入所有的表B中的数据(字段结构一样的),也可以只选择需要的部分字段

insert into test_Info select *  from sic_ia_corpration_security

 

set timing on

SQL> set timing on
SQL> select count(*) from dba_objects;

 

COUNT(*)
----------
15923

Elapsed: 00:00:01.02

 

有人问到这个时间的单位:
以上数字输出分别是:Hours:Minutes:Seconds.Milliseconds

Milliseconds 即 1 / 1000 秒。

注意有的版本,Seconds 秒位进位到分钟未减掉60,是Bug。

 

posted on 2009-11-26 14:27  无意  阅读(575)  评论(0编辑  收藏  举报

导航