ORACLE 改动表的schema

ORACLE 更改表的schema在项目开发中,有时候要更改表的schema,如 irp.user更改成irp2.user,以下为更改的方

ORACLE 更改表的schema
    在项目开发中,有时候要更改表的schema,如 irp.user更改成irp2.user,以下为更改的方法:

    create table irp2.user as select * from irp.user

    以上只是把表数据导过去,并且建立表结构,但是不会建立表的约束,如主外键、索引等,需要手工建表的约束条件。

    建完约束条件后,就可以drop table irp.user