|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Renaming columns
I am trying to rename columns in an Oracle table in SQLPlus but i keep getting an error message - ORA-14155: Missing Partition or Subpartition.
The command looks like the following" alter table classic rename column xdescription to description; Then I get the error message. What am I missing in this equation? Thanks for any help |
|
#2
|
|||
|
|||
|
Are you sure you have Alter privileges on that classic table?
If not, do you have "ALTER ANY TABLE" privileges? If that doesn't work, maybe you need the CREATE ANY INDEX privilege. In addition, if you are not the owner of the table, you need the DROP ANY TABLE privilege REF: http://technet.oracle.com/docs/prod...m2a.htm#2054899
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#3
|
|||
|
|||
|
Yes i have privileges for all actions on this table/database. I am logged in as system, and system is the owner, and still the same error.
|
|
#4
|
|||
|
|||
|
Hi Dealcloser,
The alter spec RENAME is for the table name itself and not its columns. This is from the MySQL docs: Quote:
So you need to get the original column type and re-define it. You can use describe table to get that information. |
|
#5
|
|||
|
|||
|
oralce rename column
it's for my sql but not for orcle.
who knows the command for oracle? ![]() |
|
#6
|
|||
|
|||
|
Column renaming is only supported for Oracle 9.x
I wonder if you might be doing the same mistake as I did. After working with ORA 9.xx for a long time I'm back to version 8.1.7 and was getting the ORA-14155 error (that's how I found this actually from google) and realised that this is actually is not supported by Oracle 8
How I do it: ALTER TABLE MyTable ADD MyNewColumn Varchar2(1); UPDATE MyTable SET MyNewColumn=MyOldColumn; ALTER TABLE MyTable DROP MyOldColumn; |
|
#7
|
|||
|
|||
|
Yes,
As far as I can remember, there is no real way to rename a column, other than doing exactly what tolkun has suggested.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Renaming columns |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|