Returning query results in predefined order

前端 未结 11 1025
温柔的废话
温柔的废话 2020-11-29 06:01

Is it possible to do a SELECT statement with a predetermined order, ie. selecting IDs 7,2,5,9 and 8 and returning them in that order, based on

11条回答
  •  野性不改
    2020-11-29 06:43

    Could you include a case expression that maps your IDs 7,2,5,... to the ordinals 1,2,3,... and then order by that expression?

提交回复
热议问题