MySQL Forums
Forum List  »  Newbie

Re: alter table move column syntax error
Posted by: Peter Brawley
Date: June 28, 2014 02:14PM

We can't just make up syntax. The manual (http://dev.mysql.com/doc/refman/5.7/en/alter-table.html) says ...

ALTER TABLE MODIFY [COLUMN] col_name column_definition [FIRST | AFTER col_name]

And while you're at it, year decimal(4,0) is not optimal; look up the year datatype, or if there are portability requirements consider year smallint.

so you need ...

alter table car_table modify column year year null after color;

Options: ReplyQuote


Subject
Written By
Posted
Re: alter table move column syntax error
June 28, 2014 02:14PM


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.