Please help me to see why this sentence works like this.

where = order by order asc.

the tables in my database are originally arranged and read in order

but the order is out of order after adding asc

and do not understand what the author intends

Sql
Mar.04,2021

asc is sorted in ascending order, and you say that it is possible that order is of type varchar.
it is sorted first, then the second and third bits. If it is a numeric type, there is no problem.


asc is arranged in ascending order, which means that the order fields in your database should be int in ascending order according to field order. Check it yourself. When sorting, it is best to add data_format, otherwise it is easy to be out of order.

Menu