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.
我有一些公式:
CONCAT((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,'%') AS Acceptance
但我得到的结果如下:
100.0000%
如何获得 100.00% 的结果?
您可以将 MySQL ROUND函数用作:
CONCAT(ROUND((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,2),'%') AS Acceptance