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.
当我尝试使用此查询时
SELECT MIN(CAST(`field` as SIGNED))
结果最终被四舍五入。因此,我应该得到的不是 7.56,而是 7。有什么想法吗?
因为您正在使用SIGNED,请尝试DECIMAL
SIGNED
DECIMAL
SELECT MIN(CAST(`field` as DECIMAL(10,4)))
...CAST(值作为十进制(10,5))