[plug] auto-increment in mysql

Jon Miller jlmiller at mmtnetworks.com.au
Wed Jan 1 22:24:57 WST 2003


Interesting I looked at the ALTER TABLE and did not see that part about
FIRST, etc (better put on my glasses).

Thanks

On Wed, 2003-01-01 at 22:11, James Devenish wrote:
> On Wed, Jan 01, 2003 at 10:02:08PM +0800, Jon Miller wrote:
> > Thanks for that just one more question is there a way to make the new
> > column the first column?
> 
> People on the list just suggested using ALTER TABLE and having had a
> look at the MySQL 3 documentation, there seems to be a section entitled
> "ALTER TABLE syntax". This section says, amongst other things:
> 
> > ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]
> > 
> > alter_specification:
> >         ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
> [...]
> > * In MySQL Version 3.22 or later, you can use FIRST or ADD ... AFTER
> >   col_name to add a column at a specific position within a
> >   table row. The default is to add the column last.
> 
> Is MySQL giving you a particular error message or incorrect result
> if you follow the documentation?
> 
-- 
Jon Miller <jlmiller at mmtnetworks.com.au>
MMT Networks Pty Ltd




More information about the plug mailing list