anatak Posted October 19, 2009 Share Posted October 19, 2009 Is it possible to change the order of the columns in a table after you created the table or do you have to drop the table and recreate it in the right order ? I have a table products with columns Id (primary key) ModelId Price TypeId I would like to put the TypeId column after the Id column but I am not sure if this is a good idea. It is not really important just something that nags me subconsiously and I was wondering if you could alter the table or not. kind regards anatak Link to comment https://forums.phpfreaks.com/topic/178173-solved-alter-table-change-the-order-of-columns/ Share on other sites More sharing options...
Philip Posted October 19, 2009 Share Posted October 19, 2009 I suggest reading this First' date=' consider whether you really need to change the column order in a table. The whole point of SQL is to abstract the application from the data storage format.[/quote'] Link to comment https://forums.phpfreaks.com/topic/178173-solved-alter-table-change-the-order-of-columns/#findComment-939470 Share on other sites More sharing options...
anatak Posted October 19, 2009 Author Share Posted October 19, 2009 Thanks, well as I said it is not needed at all for the application it was just for my piece of mind. I like things ordered in my DB. thanks for the link. topic closed anatak Link to comment https://forums.phpfreaks.com/topic/178173-solved-alter-table-change-the-order-of-columns/#findComment-939563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.