遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations错误

[[email protected] ~]$ sqlplus lc0029999/aaaaaa

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 10 00:11:32 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter table lc0039999.t1 rename to lc0039999.tt1;
alter table lc0039999.t1 rename to lc0039999.tt1
                                            *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

SQL> alter table t1 rename to  lc0039999.tt1;
alter table t1 rename to  lc0039999.tt1
                                   *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

SQL> show user
USER is "LC0029999"
SQL>

查询mos,得到如下文章:ORA-14047: ALTER TABLE | INDEX RENAME May Not Be Combined With Other Operations (文档 ID 400398.1)

在该文章中,说明了报错的原因:

The combination of actions appear to be:
1.the actual table rename
2.specifiying the schema name of the target

也就是说,不要带目标表的schema

值得注意的是,即使是在相同的一个schema下,目标表带有相同的schema名称,也是不允许的,如下:

SQL> show user
USER is "LC0029999"
SQL> alter table lc0029999.t1 rename to lc0029999.tt1;
alter table lc0029999.t1 rename to lc0029999.tt1
                                            *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

SQL>

但是源表可以带schema信息,如下:

SQL>  alter table lc0029999.t11 rename to tt1;

Table altered.

SQL>
时间: 2024-10-28 21:10:18

遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations错误的相关文章

[转]ALTER TABLE的用法 增多列、删除列、改列名、改列约束、改表名

[转]ALTER TABLE的用法 增加列.删除列.改列名.改列约束.改表名 ALTER TABLE 名称ALTER TABLE - 更改表属性语法ALTER TABLE table [ * ]      ADD [ COLUMN ] column typeALTER TABLE table [ * ]      ALTER [ COLUMN ] column { SET DEFAULT value | DROP DEFAULT }ALTER TABLE table [ * ]      REN

【SQL篇章】【SQL语句梳理 :--基于MySQL5.6】【已梳理:ALTER TABLE解析】

ALTER TABLE 解析实例: SQL: 1.增加列 2.增加列,调整列顺序 3.增加索引 4.增加约束 5.增加全文索引FULL-TEXT 6.改变列的默认值 7.改变列名字(类型,顺序) 8.不改变列名字 9.删除列 10.删除主键 11.删除索引 12.删除约束 13.改表名 14.改变字符集 创建一张表 CREATE TABLE t1 (a INTEGER,b CHAR(10)); 1. 增加列 格式: ADD [COLUMN] (col_name column_definition

mysql alter table

准备: create table t(x int,y int); 用法 1: 修改列的数据类 alter table t modify column y nvarchar(32); 用法2: 给表加一列 alter table t add column z int; 用法3: 删除表中的列 alter table t drop column z; 用法4: 给列改一个名字 alter table t change column y w int;这家伙要特别说明一下,它可牛逼了不只是可以改列名,还

[Hive - LanguageManual] Alter Table/Partition/Column

Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add SerDe Properties Alter Table Storage Properties Additional Alter Table Statements Alter Partition Add Partitions Dynamic Partitions Rename Partition

Hive - Create Table&Drop Table & ALTER Table(中)

译注:书接上篇,了解过创建表以及load data后,假如发现需要更改表字段类型或者添加表字段,怎么办?这篇文章将进一步了解具体细节. This chapter explains how to alter the attributes of a table such as changing its table name, changing column names, adding columns, and deleting or replacing columns. Alter Table St

MySQL如何妥善更改大表表结构(Alter table structure of a single column

MySQL如何妥善更改大表表结构(Alter table structure of a single column http://blog.sina.com.cn/s/blog_445e807b0101egpf.html 在网上搜到的一段很有帮助的三段脚本,贴出来供参考,以飨读者,做个笔记:##  Script 1#  Alter table structure of a single column of a large table#CREATE TABLE WorkingTableNew LI

alter table

表重命名 alter table t1 rename to t2; 添加分区 alter table t1 add if not exists partition(xx=yy) location '/xx'; 添加多个分区 alter table t1 add if not exists  partition(x1=y1) location '/x1' partition(x2=y2) location '/x2' partition(x3=y3) location '/x3'; 修改分区 al

ALTER TABLE - 修改表的定义

SYNOPSIS ALTER TABLE [ ONLY ] name [ * ] ADD [ COLUMN ] column type [ column_constraint [ ... ] ] ALTER TABLE [ ONLY ] name [ * ] DROP [ COLUMN ] column [ RESTRICT | CASCADE ] ALTER TABLE [ ONLY ] name [ * ] ALTER [ COLUMN ] column { SET DEFAULT expr

create index 与 alter table add index 区别

众所周知,MySQL创建索引有两种语法,即:ALTER TABLE HeadOfState ADD INDEX (LastName, FirstName);CREATE INDEX index_name HeadOfState (LastName, FirstName);那么,这两种语法有什么区别呢? 在网上找了一下,在一个英文网站上,总结了下面几个区别,我翻译出来,如下:1.CREATE INDEX必须提供索引名,对于ALTER TABLE,将会自动创建,如果你不提供:2.CREATE IND