At 15:19 +0100 7/6/06, Rob Desbois wrote:
With the CHANGE clause of ALTER TABLE statement, you must provide
the column definition, so something like this is what you need:
ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL;
or whatever your original definition is.
Wo
You can't just change the name without changing (or stating) the type.
ALTER TABLE actors CHANGE director_id actos_id varchar(96) default NULL;
J.R.
-Original Message-
From: Mark Sargent [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 07, 2006 10:10 AM
To: mysql@lists.mysql.com
Subject:
Mark,
With the CHANGE clause of ALTER TABLE statement, you must provide the column
definition, so something like this is what you need:
ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL;
or whatever your original definition is.
AFAIK there is no way to rename a column
At 0:09 +1000 8/6/06, Mark Sargent wrote:
ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20);
for changing the name of a column, right? So, why doesn't the below work?
mysql> ALTER TABLE actors CHANGE director_id actor_id;
I'm no great expert myself, but off the top of my head, may