创建一个跟表 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。

 

相关文章:

  • 2022-01-01
  • 2021-11-24
  • 2021-11-07
  • 2021-04-07
  • 2021-11-29
  • 2021-11-29
  • 2021-12-04
  • 2021-08-07
猜你喜欢
  • 2021-12-09
  • 2022-01-10
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
相关资源
相似解决方案