.不同用户之间的表数据复制

对于在一个数据库上的两个用户A和B,假如需要把A下表old的数据复制到B下的new,请使用权限足够的用户登入sqlplus:

insert into B.new(select * from A.old);

如果需要加条件限制,比如复制当天的A.old数据

insert into B.new(select * from A.old where date=GMT);

蓝色斜线处为选择条件

2.同用户表之间的数据复制

用户B下有两个表:B.x和B.y,如果需要从表x转移数据到表y,使用用户B登陆sqlpus即可:

insert into y select * from x;

3.B.x中个别字段转移到B.y的相同字段

insert into y(字段1,字段2) select 字段1,字段2 from
4.复制表结构
create table 用户名.表名 as select * from 用户名.表名 where 1=2

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-06-27
  • 2021-08-31
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
相关资源
相似解决方案