RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:54 AM >To: Jerry Schwartz >Cc: 'Ranjeet Walunj'; mysql@lists.mysql.com >Subject: RE: Re-arranging fields > >On Thu, 2008-07-31 at 10:24 -0400, Jerry

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Martijn Tonies [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:37 AM >To: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >> >> [JS] I added a dozen or so columns for a special purpose, and >although >

RE: Re-arranging fields

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 10:24 -0400, Jerry Schwartz wrote: > [JS] Users will have read-only access through MS Access, and have to filter > on various fields. You're assuming that your users will never, ever be granted anything but read-access to only the data they suppose to have, either by accident

Re: Re-arranging fields

2008-07-31 Thread Martijn Tonies
> >> [JS] I added a dozen or so columns for a special purpose, and although > >MySQL > >> doesn't care I wanted them in a certain order that would be intuitive > >to a > >> user / programmer. > > > >Why is a user looking at your database? > > > >This is a security breach. Users should only have ac

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:02 AM >To: Jerry Schwartz >Cc: 'Ranjeet Walunj'; mysql@lists.mysql.com >Subject: RE: Re-arranging fields > >On Thu, 2008-07-31 at 09:56 -0400, Jerry S

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 4:06 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >On Wed, 2008-07-30 at 14:42 -0400, Jerry Schwartz wrote: >> Is

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Rob Wultsch [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 3:56 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >Something like >ALTER TABLE [TABLE] MODIFY [COLUMN] col_name column

RE: Re-arranging fields

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 09:56 -0400, Jerry Schwartz wrote: > [JS] I added a dozen or so columns for a special purpose, and although MySQL > doesn't care I wanted them in a certain order that would be intuitive to a > user / programmer. Why is a user looking at your database? This is a security bre

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Ranjeet Walunj [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 3:55 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >Jerry Schwartz wrote: >> Is there any reasonable way of re-arran

Re: Re-arranging fields

2008-07-31 Thread Rob Wultsch
On Wed, Jul 30, 2008 at 12:56 PM, Rob Wultsch <[EMAIL PROTECTED]> wrote: > On Wed, Jul 30, 2008 at 11:42 AM, Jerry Schwartz > <[EMAIL PROTECTED]> 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

Re: Re-arranging fields

2008-07-30 Thread Mr. Shawn H. Corey
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 field

Re: Re-arranging fields

2008-07-30 Thread Rob Wultsch
Something like ALTER TABLE [TABLE] MODIFY [COLUMN] col_name column_definition [FIRST | AFTER col_name] shoudl work http://dev.mysql.com/doc/refman/5.0/en/alter-table.html On Wed, Jul 30, 2008 at 11:42 AM, Jerry Schwartz <[EMAIL PROTECTED]> wrote: > Is there any reasonable way of re-arranging the

Re: Re-arranging fields

2008-07-30 Thread Ranjeet Walunj
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. This can also be achieved in followi