At 5:46 PM +0000 2000-01-29, Thomas Barrett wrote:
>Having read through mysql.org docs and the mySQL book,
>I find no mention of this functionality (renaming fields).
>Is there a syntax for ALTER table that allows you to
>rename the fields in the table?
>Obviously as the naming was done right from the start,
>it was no problem to drop the field and insert a
>correctly named field in the right place. But I was
>wondering what the most efficient way of renaming
>fields would be if it were to be needed when the table
>already contained information.
Use ALTER TABLE tbl_name CHANGE col_name new_col_name col_definition
where col_definition is the definition that the column currently
has. Yeah, it'd be nicer to be able to simply give the old and new
column name, but you can't do it that way.
Paul DuBois, paul@stripped