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.
如何trailing 0000用 sql 表达式删除?例如,1.0100000- 我需要的是1.01在运行它之后,提前谢谢!
trailing 0000
1.0100000
1.01
如果您不希望您的数字被四舍五入(只需忽略最后的小数),请使用以下TRUNCATE功能:
TRUNCATE
TRUNCATE(1.23456, 4) --yields 1.2345
如果您希望您的数字四舍五入,请使用以下ROUND功能:
ROUND
ROUND(1.23456, 4) --yields 1.2346