List:General Discussion« Previous MessageNext Message »
From:Jesper Wisborg Krogh Date:June 28 2014 11:46pm
Subject:RE: alter table modify syntax error
View as plain text  
Hi Tim,

> -----Original Message-----
> From: Tim Dunphy [mailto:bluethundr@stripped]
> Sent: Sunday, 29 June 2014 03:45
> Cc: mysql@stripped
> Subject: Re: alter table modify syntax error
> 
> Hey guys,
> 
>  Sorry to hit you with one more. But I'm trying to use a positional statement
> in a column move based on what you all just taught me:
> 
> mysql> alter table modify column color varchar(10) sixth;
> 
> But I am getting this error:
> 
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to use
> near 'column color varchar(10) sixth' at line 1

The syntax "sixth" is not a supported syntax. You should use the syntax "AFTER
<column_name>" where you replace <column_name> with the column name you want
to position the modified column after.

See also: https://dev.mysql.com/doc/refman/5.5/en/alter-table.html

Best regards,
Jesper Krogh
MySQL Support


Thread
alter table modify syntax errorTim Dunphy28 Jun 2014
  • Re: alter table modify syntax errorCarsten Pedersen28 Jun 2014
    • Re: alter table modify syntax errorTim Dunphy28 Jun 2014
      • Re: alter table modify syntax errorTim Dunphy28 Jun 2014
        • RE: alter table modify syntax errorJesper Wisborg Krogh28 Jun 2014
          • Re: alter table modify syntax errorTim Dunphy29 Jun 2014
            • RE: alter table modify syntax errorJesper Wisborg Krogh29 Jun 2014
              • Re: alter table modify syntax errorTim Dunphy29 Jun 2014