Meaningless Drivel is fun!*
The moose likes Oracle/OAS and the fly likes How to sort a table data in oracle? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "How to sort a table data in oracle?" Watch "How to sort a table data in oracle?" New topic
Author

How to sort a table data in oracle?

aresh babu
Ranch Hand

Joined: Aug 31, 2008
Posts: 65
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
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 511
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
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to sort a table data in oracle?
 
Similar Threads
how to write BLOB type of data from java application into an oracle table
access to oracle
JDBC connection with JTable
hex to String Help!!!!!!!!!!!!!!!!!!!!
Upload the Excel data in the Oracle Database