Alter table column order

  • Hey,

    Can anyone tell me how i can write an sql that can add a column near the start of a table, as opposed to putting it at the end ?

    Thanks

    Dougwa

  • I don't think u can to this in simple way

    other wise

    1. Make a data backup of the existing table to temp table

    drop the table

    recreate the table again

    put data back to the new table

    drop the temp table

     




    My Blog: http://dineshasanka.spaces.live.com/

  • I agree with Dinesh and I'll add that, practically, the order of columns in a tabe doesn't matter.

    Greg

    Greg

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply