Yeah, like redo your application so it's not important anymore. :) You can always display it however you want. The physical order of a column shouldn't be important. If you are set on this though, create the column at the end like it always does unless you drop and recreate, then just reorder it. I really, really hate doing this though.--Create the table to fix this awful nightmare of a situationCREATE TABLE djl_test_colid( int1 INT, int2 INT, value VARCHAR(55), int3 INT)INSERT djl_test_colid(int1, int2, value, int3) SELECT 1,2,'Here''s the problem',4SELECT * FROM djl_test_colid--Notice that the colid is what "physically" orders the table. ---Because of this, you have to recreate the table to reorder, which is what EM does.SELECT so.name, sc.name AS column_name, sc.colidFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'--The other option is to muck around with the system tables, which I highly recommend against.UPDATE scSET colid = CASE WHEN colid = 3 THEN 4 WHEN colid = 4 THEN 3 ELSE colid ENDFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'SELECT * FROM djl_test_colid--Notice now that everything is right in the order of orderdom.SELECT so.name, sc.name AS column_name, sc.colidFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'--Clean up after yourself. gheeshDROP TABLE djl_test_colid
MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA.