List:General Discussion« Previous MessageNext Message »
From:Mr. Shawn H. Corey Date:July 30 2008 8:06pm
Subject:Re: Re-arranging fields
View as plain text  
On Wed, 2008-07-30 at 14:42 -0400, Jerry Schwartz wrote:
> Is there any reasonable way of re-arranging the order of columns in a table
> without losing their data? The best I could come up with was to copy the
> table, empty it, and then do an INSERT . SELECT specifying the new order of
> the fields.

According to RDB theory, the order of the columns is immaterially, just
as is the order of the rows.  You should always explicitly name the
columns in the order you want.  Relying on their default order can lead
to problems down the road.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

"Where there's duct tape, there's hope."

"Perl is the duct tape of the Internet."
        Hassan Schroeder, Sun's first webmaster

Thread
Re-arranging fieldsJerry Schwartz30 Jul
  • Re: Re-arranging fieldsRanjeet Walunj30 Jul
    • RE: Re-arranging fieldsJerry Schwartz31 Jul
      • RE: Re-arranging fieldsMr. Shawn H. Corey31 Jul
        • RE: Re-arranging fieldsJerry Schwartz31 Jul
          • RE: Re-arranging fieldsMr. Shawn H. Corey31 Jul
            • RE: Re-arranging fieldsJerry Schwartz31 Jul
  • Re: Re-arranging fieldsRob Wultsch30 Jul
    • Re: Re-arranging fieldsRob Wultsch31 Jul
    • RE: Re-arranging fieldsJerry Schwartz31 Jul
  • Re: Re-arranging fieldsMr. Shawn H. Corey30 Jul
    • RE: Re-arranging fieldsJerry Schwartz31 Jul
  • Re: Re-arranging fieldsMartijn Tonies31 Jul
    • RE: Re-arranging fieldsJerry Schwartz31 Jul