At 2:12 PM -0800 11/2/01, Bennett Haselton wrote:
>How do you change the order of columns in MySQL tables?  I assume 
>the tables have a concept of column order, since the DESCRIBE 
>command always lists the columsn in the order in which they were 
>created.
>
>I figured that the place to look would be the syntax page for the 
>ALTER TABLE statement:
>       http://www.mysql.com/doc/A/L/ALTER_TABLE.html
>but there's nothing there about how to change the order of columns.

You can specify the position with a FIRST or AFTER col_name clause
when you add a column, but not (as far as I know) change the position
of an existing column.

Do you have some weird application requirement that makes this necessary?
You can always name the columns in the order you want them to come
out, when you issue a SELECT query.

>
>       -Bennett
>
>[EMAIL PROTECTED]     http://www.peacefire.org
>(425) 649 9024


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to