[plug] auto-increment in mysql
James Devenish
devenish at cyllene.uwa.edu.au
Wed Jan 1 22:11:56 WST 2003
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?
More information about the plug
mailing list