Division ( / ) not giving my answer in postgresql

前端 未结 4 1710
梦谈多话
梦谈多话 2020-12-24 04:36

I have a table software and columns in it as dev_cost, sell_cost. If dev_cost is 16000 and sell_cost is 7500

4条回答
  •  伪装坚强ぢ
    2020-12-24 04:51

    This query will round result to next integer

    select round(dev_cost ::decimal / sell_cost + 0.5)
    

提交回复
热议问题