In PostgreSQL everyone has used round bar, how to show when the decimal point? See Example
SELECT To_char (Round (127 * 0.1/67543,6) *10000, ' 90.99 ')
1.88
SELECT To_char (Round (127 * 0.1/67543,6) *10000, ' 90.00 ')
1.88
SELECT To_char (Round (150 * 0.1/50000,6) *1000, ' 90.09 ')
0.30
SELECT To_char (Round (150 * 0.1/50000,6) *1000, ' 00.09 ')
00.30
SELECT To_char (Round (150 * 0.1/50000,6) *1000, ' 99.09 ')
.30
Did you see the rules? Hehe, the results of the above SQL show: 0 is any placeholder, if there is data on 0 bits to display the data, if there is no data on the display 0;9 is a real placeholder, 9 bits of data (greater than 0), display data, no data and nothing is displayed.
So when we want to take a percentage or thousands of points, to meet the xx.xx format, we need to use 90.99 when the placeholder
Mixed use of To_char and round in PostgreSQL