Custom sort order for dataset after executing query?
问题 I want the result set of a database query to have a certain order. The information I want to order by is not contained in the database, but dynamically generated in code (so I cannot use ORDER BY ). Is there a way to sort a dataset after executing the database query? (I don't need indexed access but only want to iterate over all records.) 回答1: There is a possibility that shares similarities with Jens' answer (+1) but gets to the result in a slightly different fashion. Given an existing table: