I am doing an SQL query using the sum()
function. This function adds integers and fractional numbers. The problem is that it returns a double precision with a very large number. How do I limit to two decimal places after the point?
Code
SELECT sum(comprimento * largura * qtde) as met FROM seccionada WHERE cod_secc = 'SE1'
Query result:
40.1699985265732
I wanted the answer to be:
40.16