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.
是否可以通过对 2 个字段的操作的乘积对 MySQL 结果进行排序
例如:field1*field2=product
field1*field2=product
MySQL:SORT BY product ASC;
SORT BY product ASC;
它真的没有什么复杂的。ORDER BY您可以在子句中使用别名。
ORDER BY
SELECT field1*field2 AS product FROM tableName ORDER BY product