zoukankan      html  css  js  c++  java
  • ORA-14155,ORA-14047

    用pl/sql工具rename一个表名时报ora-14155和ora-14047错误,过程如下:

    1.创建测试表

    17:14:43 SQL> create table test_id (id int,addr  varchar2(50));
    
    Table created.

    2.rename表名,报错 ORA-14155: missing PARTITION or SUBPARTITION keyword,原因分析:语法错误,正确语法应是rename to

    17:17:47 SQL> alter table hr.test_id rename hr.test_addr;
    alter table test_id rename test_addr
                               *
    ERROR at line 1:
    ORA-14155: missing PARTITION or SUBPARTITION keyword

    3.rename to表名,报错,ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations,原因分析:当你执行alter table hr.test_id 的时候,你已经告诉oracle你要修改哪个用户下的哪个表了,所以在rename to 的时候就不需要在指定用户名称了.如果在写用户名的话,oracle也许会认为你是要把hr下的test_id 表改名存储到其他用户下面去,oracle不允许这么做!

    17:18:17 SQL> alter table hr.test_id rename to hr.test_addr;
    alter table hr.test_id rename to hr.test_addr
                                       *
    ERROR at line 1:
    ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

    4.rename表名成功

    17:19:05 SQL> alter table hr.test_id rename to test_addr;
    
    Table altered.
  • 相关阅读:
    What Kind of Friends Are You? ZOJ 3960
    博弈随笔(未完待续)
    Mergeable Stack ZOJ
    LIS ZOJ
    差分约束 HDU
    How far away ? HDU
    wya费用流
    不知道说些什么
    ext大法好啊
    bzoj2348
  • 原文地址:https://www.cnblogs.com/tomatoes-/p/11084090.html
Copyright © 2011-2022 走看看