In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the ORA-14047 error when changing the table name in the database", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to solve the ORA-14047 error when changing the table name in the database.
Use test users to create test tables rename_tableSQL > show user;USER is "TEST" SQL > create table rename_table (id int); Table created.SQL > select table_name from user_tables TABLE_NAME----RENAME_TABLE uses SYS users to modify the table name of test users
SQL > show user;USER is "SYS" SQL > alter table test.RENAME_TABLE rename to test.RENAME_TABLE2;alter table test.RENAME_TABLE rename to test.RENAME_TABLE2 * ERROR at line 1:ORA-14047: ALTER TABLE | INDEX RENAME may not be combined with other operations
Cause of the problem
Oracle allows A users to modify the B user table name, but the user name cannot be specified before the new table name. The following method was used to modify the table name successfully.
SQL > alter table test.RENAME_TABLE rename to RENAME_TABLE2;Table altereSQL > select OWNER,TABLE_NAME from dba_tables where owner='TEST';OWNER TABLE_NAME--TEST RENAME_TABLE2
+ + split line + +
There is also a command rename to to change the table name, but this command can only change the table name of the following table for its own user.
Use the Sys user to modify the table name of the test user table
SQL > show user;USER is "SYS" SQL > select OWNER,TABLE_NAME from dba_tables where owner='TEST';OWNER TABLE_NAME--TEST RENAME_TABLE2SQL > rename test.RENAME_TABLE2 to RENAME_TABLE Rename test.RENAME_TABLE2 to RENAME_TABLE * ERROR at line 1:ORA-01765: specifying owner's name of the table is not allowed
Switch to test user, the table name was modified successfully
SQL > show user; USER is "TEST" SQL > select OWNER,TABLE_NAME from dba_tables where owner='TEST';OWNER TABLE_NAME--TEST RENAME_TABLE2SQL > rename RENAME_TABLE2 to RENAME_TABLE Table renamed.SQL > select OWNER,TABLE_NAME from dba_tables where owner='TEST' OWNER TABLE_NAME--TEST RENAME_TABLE so far, I believe you have a deeper understanding of "how to solve the ORA-14047 error when changing the table name in the database". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.