A database table that I've had to work with has a something called identifiers which are humanreable names of questions. There's a HTML template where the question designer can place the various questions in a human-sorted order. All questions get identifiers in the form of <something><number>
like this: Head1
or Soma3
or Reg10
where Head
, Soma
and Reg
are sections. Changing the nameing convention from Head1
to Head01
is too late because all the templates already expect Head1
not Head01
.
Initially I sorted the identifiers like this:
SELECT id, identifier
FROM questions
WHERE section=123
ORDER BY identifier
The result you would get is:
Head1
Head10
Head2
Head3
...
The human readable sort order should have been this:
Head1
Head2
Head3
...
Head10