Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据库中有一堆具有想象名称的产品,例如“256”、“167 brown”和“1115 black”,我需要按产品编号排序返回它们,以便名为 256 的产品出现在 1115 black 之前但在 167 brown 之后。有没有办法做到这一点?
尝试这个:
SELECT code FROM your_table ORDER BY CAST(code AS SIGNED)