I have stored various records in the MySql database "orkut". Now I want to sort that database through a java program. I have connected to the database through the jdbc driver. Now I want to sort that database in decreasing order of the field "number" of type "int" but don't know the commands. I have "con" reference variable which denotes the connection to the MySql database.
One more thing, there is a field "sr_no" that denotes the serial no. of the record and it is not the primary key.
I want that this field won't change after sorting the database as the serial no. should not change on changing the order of the records.
I want this sorting permanently stored on the same database. I don't want sorted ResultSet. I want sorted database.