Columns displayed in incorrect order when select * from table in sql developer

11,623

Right-click on your column header and select 'delete persisted settings'

I'm guessing at some point you or someone else on your machine re-ordered the columns.

This will reset any stored order in SQL Developer.

Like so...

Share:
11,623
philipmasonno1
Author by

philipmasonno1

Updated on June 18, 2022

Comments

  • philipmasonno1
    philipmasonno1 almost 2 years

    When I use a select * statement in SQL developer, the order of the columns returned is not the order defined in the table. If I view the table itself in the connections pane, under the columns tab the columns are in the correct order and have the correct column id assigned. When anyone else runs a query on the table using a different pc, the columns are displayed in the correct order. This leads me to believe that this is a setting in my sql developer. If I'm correct, how can I change this.

    EX. The columns are in this order according to their column id in the columns tab. This the left to right order displayed when a select * is performed on this table from any other pc:

    1. MESSAGE_ID
    2. SOURCE_ID
    3. EVENT_ID
    4. WHEN_CREATED
    5. CONTAINER_ID
    6. CONTAINER_TYPE
    7. WAVE_NUMBER
    8. LOCATION
    9. DEST_LOCATION
    10. ITEM_NAME
    11. BATCH_NUMBER
    12. BARCODE
    13. CONTAINER_QUANTITY
    14. CUBE_VOLUME
    15. ORDER_ID
    16. PICK_STATUS
    17. PICK_PUT_LOCATION
    18. ITEM_QUANTITY
    19. PICKED_QUANTITY
    20. REQUIRED_QUANTITY
    21. MOD_DATE
    22. USER_ID
    

    However, when I select * from this table in sql developer on my pc, this is the order they appear from left to right:

    1. WAVE_NUMBER
    2. LOCATION
    3. ITEM_NAME
    4. BATCH_NUMBER
    5. BARCODE
    6. CONTAINER_ID
    7. CONTAINER_QUANTITY
    8. CUBE_VOLUME
    9. ORDER_ID
    10. PICK_STATUS
    11. PICK_PUT_LOCATION
    12. ITEM_QUANTITY
    13. PICKED_QUANTITY
    14. REQUIRED_QUANTITY
    15. MOD_DATE
    16. USER_ID
    17. MESSAGE_ID
    18. SOURCE_ID
    19. EVENT_ID
    20. WHEN_CREATED
    21. CONTAINER_TYPE
    22. DEST_LOCATION
    
    • Moudiz
      Moudiz about 8 years
      A good practice is to mention the columns when selecting them , however check the below lings DBMS_REDEFENITION and this SO Anser
    • Moudiz
      Moudiz about 8 years
      @Aleksej the link you gave is broken
    • philipmasonno1
      philipmasonno1 about 8 years
      @Moudiz thank you for the reply, however this is a quick reference table where users will not know what to select. I previously referenced this before in the initial question, but I'm the only one who gets the columns out of order. That's what makes me think that this has something to do with my sql developer exclusively.
  • philipmasonno1
    philipmasonno1 about 8 years
    What version of developer are you using? when i right click, i don't have that option. I only have the auto-fit options.
  • thatjeffsmith
    thatjeffsmith about 8 years
    that's version 4.1.3 - but most of those context menu items have been there for years. If you're not seeing those items - this is from a Oracle query result in a SQL worksheet, something is 'borked' with your install. try deleting the systemX.Y.Z folder. On Windows, this in is the $USER/AppData/Roaming folder
  • philipmasonno1
    philipmasonno1 about 8 years
    That may be the problem of why i don't see it. I'm using a company laptop that has 1.5.5. Does anyone know how to clear "delete the persisted settings..." in an earlier version?
  • thatjeffsmith
    thatjeffsmith about 8 years
    Your company won't mind if you get software from 2016 vs 2006. Just get the zip from OTN, no installer required.