Alex Rivera | Logout

Does column order matter in your MySQL tables?

Asked 2010-01-21T18:52:09.520
33

While learning mysql, I read that you can perform the following statement when adding a column to a mysql table:

ALTER TABLE contacts ADD email VARCHAR(60) AFTER name;

or

ALTER TABLE contacts ADD email VARCHAR(60) FIRST;

When would you want to do this? Can column order be utilized for query optimization purposes? Should longblobs be the last column to optimize space consumption? Or do these commands exist for some other reason?

Edit
Report

1 Answer

2

The relational model has no concept of ordering of columns within rows and no concept of ordering of rows within tables.

answered 2010-01-22T00:07:50.950

Your Answer