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 name ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Solution
Quote:
Alter table <tablename> drop column <columnname> Second: Alter table <tablename> add(<columnname> <datatype>) |
|
|||
|
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...!!
Quote:
ORA-14155:Missing partition or SUBPARTITION keyword |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Want to change the datatype of the column | siri6589 | Oracle Database | 2 | 04-22-2007 11:44 AM |
| Oracle : 'Creating Search Pages' DEVELOPER: Frameworks Column | techguru | Oracle Tutorials | 0 | 08-27-2005 04:35 PM |
| [FAQ] FileMaker Pro - database for Macintosh and Windows | Martin Trautmann | Tech FAQ | 0 | 04-17-2004 07:26 AM |