Home  >  Article  >  Database  >  Oracle复制表结构

Oracle复制表结构

WBOY
WBOYOriginal
2016-06-07 17:34:171582browse

1. 复制表结构及其数据: create table table_name_new as select * from table_name_old 2. 只复制表结构: create table table

Oracle复制表结构

[日期:2014-01-06] 来源:Linux社区  作者:finefun [字体:]

1. 复制表结构及其数据:

create table table_name_new as select * from table_name_old

2. 只复制表结构:

create table table_name_new as select * from table_name_old where 1=2;

或者:

create table table_name_new like table_name_old --这个可能因版本而已,,我当时测试的时候没有成功

3. 只复制表数据:

如果两个表结构一样:

insert into table_name_new select * from table_name_old

如果两个表结构不一样:

insert into table_name_new(column1,column2...) select column1,column2... from table_name_old

Oracle中用户之间复制表数据

Oracle如何复制表的sql语句 

Oracle误删除表数据后的的快速回复功能

linux

  • 0
  • Oracle在安装好后,突然更换ip后,监听不可用

    创建Oracle 口令文件

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn