Logician Posted November 7, 2011 Share Posted November 7, 2011 When I execute; select * from alphabet; I get the rows: | A | B | D | C | Is it possible to move the column "D" over, so I get: | A | B | C | D | ? Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/ Share on other sites More sharing options...
trq Posted November 7, 2011 Share Posted November 7, 2011 I assume you mean fileds, not rows. Don't use SELECT *, specify what fields you want and you will get them in the order you have asked for. Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/#findComment-1285814 Share on other sites More sharing options...
Logician Posted November 7, 2011 Author Share Posted November 7, 2011 Wow, I meant columns. Sorry about that confusing post. I have been stressing due to crossing the line over to a state of development nightmare. I make allot of mistakes when I stress. ... so when I execute: select * from alphabet; instead of seing: | A | B | D | C | ... I want to see: | A | B | C | D | Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/#findComment-1285896 Share on other sites More sharing options...
trq Posted November 7, 2011 Share Posted November 7, 2011 See my previous reply. Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/#findComment-1286016 Share on other sites More sharing options...
The Little Guy Posted November 7, 2011 Share Posted November 7, 2011 alter table yourtablename change col4 col4 varchar(15) after col2 Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/#findComment-1286028 Share on other sites More sharing options...
Logician Posted November 8, 2011 Author Share Posted November 8, 2011 Thanks, The Little Guy. That worked perfectly. Link to comment https://forums.phpfreaks.com/topic/250602-moving-rows-in-a-table/#findComment-1286104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.