1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Adding a column between existing columns

Discussion in 'SQL PL/SQL' started by Tariq Bashir Malhi, Jul 8, 2010.

  1. Tariq Bashir Malhi

    Tariq Bashir Malhi Forum Advisor

    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    80
    I want to add some new columns in an existing table that has over 10 millions rows, but not at the end of existing columns, my requirement is such i want new columns between existing existing columns. Is it possible.....
     
  2. josephsanmiguel

    josephsanmiguel Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    haven't try this yet but whenever I saw the answer I will post it immediately.thanks. good lcuk on this. I've been trying to know this since I learned Oracle and still cant find a correct one.
    I did backed-up the table.
    Then I reselect the table's columns and insert the new columns between the old columns.
    Hope this would help.
    Regards,
     
  3. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Not without recreating the table. Columns added to an existing table always are appended to the end of the column list. Why do you 'need' these columns in a specific order? Are you using 'select *' to return the values? If so this is a mistake.
     
  4. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India