me looking so small in this world

21 2006f December, 2006

rearrange columns in mysql

Filed under: mysql — rudyegenias @ 2:30 pm

Suppose I have a table with:

id int(11) auto_increment,
date datetime,
created_at datetime

and want’s to have this arrangement:

id int(11) auto_increment,
created_at datetim,
date datetime

This will be the command to do just that.

ALTER table test.date MODIFY COLUMN created_at date AFTER id

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.