Home » RDBMS Server » Enterprise Manager » rename column
rename column [message #68359] Tue, 10 June 2003 01:07 Go to next message
aril
Messages: 11
Registered: June 2003
Junior Member
hi, i'm a beginner in oracle 9i. i have a problem where i would like to change one of column name in my table. but there always an error message like shown below:

SQL> alter table spj01_peribadi
2 rename column spj01_nama1 to spj01_nama;
rename column spj01_nama1 to spj01_nama
*
ERROR at line 2:
ORA-14155: missing PARTITION or SUBPARTITION keyword

how can i solve this problem. i need somebody to help me with this problem
Re: rename column [message #68362 is a reply to message #68359] Thu, 19 June 2003 13:36 Go to previous messageGo to next message
Satish Shrikhande
Messages: 167
Registered: October 2001
Senior Member
It could be the version problem .
Are you sure your version is 9.2 ?
Re: rename column [message #68622 is a reply to message #68359] Tue, 27 April 2004 23:15 Go to previous messageGo to next message
Sujeeva
Messages: 3
Registered: July 2001
Junior Member
I used following SQL in ORACLE 9.2 database and it was successfull

alter table location
rename column loc to location;
Re: rename column [message #68766 is a reply to message #68359] Thu, 02 September 2004 10:12 Go to previous messageGo to next message
Milko
Messages: 1
Registered: September 2004
Junior Member
You cannot rename column directly. You can do it the way described in this example (the registration is free):
(http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a85397/state17e.htm#2064978)

Example
Rename a Database Object Example
To change the name of table dept to emp_dept, issue the following statement:

RENAME dept TO emp_dept;

You cannot use this statement directly to rename columns. However, you can rename a column using this statement together with the CREATE TABLE statement with AS subquery. The following statements re-create the table static, renaming a column from oldname to newname:

CREATE TABLE temporary (newname, col2, col3)
AS SELECT oldname, col2, col3 FROM static;

DROP TABLE static;

RENAME temporary TO static;

Your error ORA-14155 is because Oracle "thinks" COLUMN ought to be PARTITION or SUBRARTITION - see this example:
(http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a85397/statem2a.htm#2057289)
ALTER TABLE employee RENAME PARTITION emp3 TO employee3;
Re: rename column [message #68865 is a reply to message #68359] Mon, 20 December 2004 01:31 Go to previous messageGo to next message
kamal
Messages: 12
Registered: February 2002
Junior Member
Hi
when i tried to rename the column name there is always an error ORA-14155: missing PARTITION or SUBPARTITION keyword.so plz tell me how to solve this
Re: rename column [message #68888 is a reply to message #68865] Mon, 10 January 2005 02:00 Go to previous message
usha yadav
Messages: 1
Registered: January 2005
Junior Member
to rename a column , please try this :

alter table client
2 rename column clt_name to client_name;
Previous Topic: Oracle Management Server
Next Topic: OEM
Goto Forum:
  


Current Time: Wed May 18 18:40:05 CDT 2022