
- Forum
- Database
- Oracle Database
- Rename column name
Rename column name
This is a discussion on Rename column name within the Oracle Database forums, part of the Database category; How can I change the name of the column ? and in big sized database design if I change the ...
-
Rename column name
How can I change the name of the column ? and in big sized database design if I change the name of the column How can we solve this cumbersome task..?
-
Solution
-
dear friend
my question is to change the name of COLUMN , not the name of Table..
-
You can rename a column in a table as follows:
ALTER TABLE tablename RENAME COLUMN oldcolumn TO newcolumn;
I would suggest that you must be careful and assured while designing the database itself regarding these. Only if it is very essential go for this process now.
-
You can also rename by adding a column with a new name and dropping old columns. This can be done as below:
alter table t1 add ( newcolame datatype );
update t1 set newcolname=oldcolname;
alter table t1 drop column oldcolname;
Try as suggested and let us know the result.
-
Error comeing...!!
I used above command but there is error message as below
ORA-14155:Missing partition or SUBPARTITION keyword
-
-
10-22-2011, 03:35 AM #8
all answers will be same but sum are essential
-
but be sure the column should not contain values.
-
alter table tablename rename column columnname to newname;
-
Sponsored Ads

Reply With Quote
no one to help me please....!!!!





