0

In PostgreSQL I am using the function round but it does not return decimal point. See the example

select round(10.65)

returns 11, but actually I need 11.00.

I also tried

select round(10.65, 2)

and it returns 10.65.

How to return the numeric value with two decimal points in PostgreSQL?

I want the output like this select round(10.65) should return 11.00. How to make it possible?

1 Answer 1

3

I think you should do this:

 select round(round(10.65),2);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.