Custom ORDER BY to ignore 'the'

后端 未结 7 2146
野趣味
野趣味 2020-12-09 11:00

I\'m trying to sort a list of titles, but currently there\'s a giant block of titles which start with \'The \'. I\'d like the \'The \' to be ignored, and the sort to work o

7条回答
  •  余生分开走
    2020-12-09 11:27

    I think you could do something like

    ORDER BY REPLACE(TITLE, 'The ', '')
    

    although this would replace any occurrence of 'The ' with '', not just the first 'The ', although I don't think this would affect very much.

提交回复
热议问题