szadroga
asked on
How to sort and existing table in SQL (SMMS 2005)
I currently have a table already in production that would like to add a sort to (GROUP BY field ASC). The table currently is just sorted by the PK in an ascending order. i would like to sort on another field.
The table is used as a backend storage for a web app. So by the sorting the table on the backend, I would like the usernames sorted on the front end web app.
The table is used as a backend storage for a web app. So by the sorting the table on the backend, I would like the usernames sorted on the front end web app.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Instead trying to sort the table you can have the current Primary Key which sorts the data physically in that table and then whenever you fetch the records from the table, query using appropriate GROUP BY and Sortings.