字段排序:属性为字符串,值为数字
SQL Server
SELECT *
FROM your_table
ORDER BY CAST(your_string_column AS INT);
Mysql
SELECT *
FROM your_table
ORDER BY CAST(your_string_column AS SIGNED INTEGER);
SELECT *
FROM your_table
ORDER BY your_string_column + 0;
PostgreSQL
SELECT *
FROM your_table
ORDER BY CAST(your_string_column AS INTEGER);
其他正常排序
order by XXX asc,YYY desc