首页 > 代码库 > oracle 表复制
oracle 表复制
oracle 表复制
1>create table ... as select ..,表不存在的情况下,创建表并且复制数据。oralce中表不存在的情况下用此语句。
create table newTable as select * from soruceTable
2>insert into ...select from...,表存在的情况下,复制数据,oracle中可以用此语句复制数据。
insert into targetTable(value11,value12..) select from value21,balue22 from sourceTable
3>select ...into ... from ..,表不存在的情况下,创建表并且复制数据,在plsql中直接运行会报错,需要再块中运行。
select value11,value12... into newTable from sourceTable
转载自:http://www.cnblogs.com/guohu/articles/2744481.html
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。