General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old July 9th, 2003, 01:45 PM
dealcloser dealcloser is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 dealcloser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old July 9th, 2003, 02:48 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
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.

Reply With Quote
  #3  
Old July 9th, 2003, 03:35 PM
dealcloser dealcloser is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 dealcloser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old July 9th, 2003, 07:13 PM
avit avit is offline
Not Yet Perfect
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Squamish, BC
Posts: 111 avit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to avit
Hi Dealcloser,

The alter spec RENAME is for the table name itself and not its columns. This is from the MySQL docs:

Quote:
You can rename a column using a CHANGE old_col_name create_definition clause. To do so, specify the old and new column names and the type that the column currently has. For example, to rename an INTEGER column from a to b, you can do this:


mysql> ALTER TABLE t1 CHANGE a b INTEGER;


So you need to get the original column type and re-define it. You can use describe table to get that information.

Reply With Quote
  #5  
Old August 23rd, 2003, 05:56 AM
MUSH MUSH is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 MUSH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oralce rename column

it's for my sql but not for orcle.
who knows the command for oracle?


Reply With Quote
  #6  
Old October 2nd, 2003, 09:22 AM
tolkun tolkun is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Belgium
Posts: 1 tolkun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to tolkun
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;

Reply With Quote
  #7  
Old October 2nd, 2003, 05:58 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > Renaming columns


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway