• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to sort a table data in oracle?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I would like to know if there is an Oracle feature to change the order of columns in an existing table.

I want to avoid to re-create the table and migrate the data.

Thank you and best regards -
Aresh
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Not sure what your question is about.
Sorting a table data can be achieved using "ORDER BY" Clause.

Oracle feature to change the order of columns in an existing table


Regarding this you can rearrange the columns as you like when you fire the SELECT query.

Regards,
Amit
 
author & internet detective
Posts: 42145
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would the order of the columns matter? It's just an artifact of physical storage based on the order the columns were defined. When you query, you can write "select col1, col3, col2"; independent of the order in the database. In fact, it is best to avoid select * anyway in case things change.
reply
    Bookmark Topic Watch Topic
  • New Topic