MySQL Forums
Forum List  »  Newbie

column rename?
Posted by: Jim Babcock
Date: June 24, 2005 02:23PM

Hello,

I'm afraid I've pulled a stupid user's trick... I wanted to add a primary key contstraint to a table, but the were some duplicate entries, so I just did a create as, grouping on the key and summing the other columns... which worked fined, except I forgot to rename the columns, so now I have a table that looks like:

+------------+--------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------------------+-------+
| tstamp | datetime | | PRI | 0000-00-00 00:00:00 | |
| sum(op100) | double(17,0) | YES | | NULL | |
| sum(op700) | double(17,0) | YES | | NULL | |
| sum(total) | double(17,0) | YES | | NULL | |
+------------+--------------+------+-----+---------------------+-------+
4 rows in set (0.00 sec)

which besides being embarassing, is very usable. To make matters worse, I dropped the original table before I noticed it. I've several things I've read on line, but none have worked so far.

Any ideas?

Jimbus

Options: ReplyQuote


Subject
Written By
Posted
column rename?
June 24, 2005 02:23PM
June 24, 2005 02:34PM
June 27, 2005 01:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.