摘要:
-1 例子postgres=# select 1/4;?column? 0(1 row) 在PG里如果想做除法并想保留小数,用上面的方法却行不通,因为"/" 运算结果为取整,并且会截掉小数部分。 --2 类型转换postgres=# select round(1::numeric/4::numeri 阅读全文
posted @ 2023-01-17 18:03 一佳一 阅读(722) 评论(0) 推荐(0)
|
||
摘要:
-1 例子postgres=# select 1/4;?column? 0(1 row) 在PG里如果想做除法并想保留小数,用上面的方法却行不通,因为"/" 运算结果为取整,并且会截掉小数部分。 --2 类型转换postgres=# select round(1::numeric/4::numeri 阅读全文
posted @ 2023-01-17 18:03 一佳一 阅读(722) 评论(0) 推荐(0) |
||