List:General Discussion« Previous MessageNext Message »
From:Tim Dunphy Date:June 29 2014 1:40am
Subject:Re: alter table modify syntax error
View as plain text  
>
> Given the title of the book is "Head First SQL" and not "Head First MySQL"
> it probably isn't exclusively using syntax for MySQL. While SQL is a
> standard the various SQL databases are not completely identical with the
> syntax they support. This may be due to not completely conforming to the
> standard, using different versions of the SQL standard, or that there is
> not standard for that operation.


Hey, that's some good input. Thanks and makes total sense. I guess the
reason I thought I could use that syntax is that the book uses MySQL for
all it's examples and explains that it does so because MySQL is a free and
open source version of SQL that's easy to install. But maybe you're right
and they do depart into other syntaxes of SQL. I just don't know where they
got that 'first, second, third, etc' version of the alter table syntax
from. Definitely not sweatin' this detail tho, I am totally fine with what
you showed me that works.

Thanks again for your input!
Tim


On Sat, Jun 28, 2014 at 9:14 PM, Jesper Wisborg Krogh <mysql@stripped>
wrote:

> Hi Tim,
>
> > -----Original Message-----
> > From: Tim Dunphy [mailto:bluethundr@stripped]
> > Sent: Sunday, 29 June 2014 10:09
> > To: Jesper Wisborg Krogh
> > Cc: mysql@stripped
> > Subject: Re: alter table modify syntax error
> >
> > >
> > > 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.
> >
> >
> > Oh thanks. That's actually what I ended up doing after I got frustrated
> with
> > that error.  I was following the book 'Head First SQL' which was
> suggesting
> > that you could do something like what this user was trying in this stack
> > overflow thread:
> >
> > http://stackoverflow.com/questions/19175240/re-arranging-columns-in-
> > mysql-using-position-keywords-such-as-first-second
> >
> > But the answer in that thread too suggests that this is wrong. So is the
> Head
> > First SQL book just referring to an outdated syntax that doesn't work
> > anymore? I can't imagine that it never worked if it's in that book. But
> hey ya
> > never know! ;)
>
> Given the title of the book is "Head First SQL" and not "Head First MySQL"
> it probably isn't exclusively using syntax for MySQL. While SQL is a
> standard the various SQL databases are not completely identical with the
> syntax they support. This may be due to not completely conforming to the
> standard, using different versions of the SQL standard, or that there is
> not standard for that operation.
>
> Best regards,
> Jesper Krogh
> MySQL Support
>
>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

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