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.
如何在mysql中将字符串格式化为数字。
例如,
将值 1,222,333.22 转换为结果:1222333.22
利用CAST()
CAST()
SELECT CAST(REPLACE(colName, ',', '') AS DECIMAL(10,2))