T.money is the left column of the following figure
To_char (Round (T.money, 2), ' 0.00 ') is the right column of the following figure
To take it apart, round (t.money,2) means rounding the T.money "two digits after the decimal point".
To_char (XX, ' 0.00 ') is the output of XX according to the format of the 0.00 template.
So 0.00 is what template it is. This depends on the use of the To_char function:
======to_char when converting a number, the template means:
This is the official description:
Writing is really rubbish, let people do not know the so-called.
My understanding, as long as the following can be remembered:
1) 0: If the bit has no value, the default is 0;
2) 9: If the bit has no value, also does not complement 0;
3 How many bits are set in the template value, the final result shows how many bits, that is, the format of the template determines the output format of the result.
As To_char (50.355, ' 99.00 ') results: 50.34
As To_char (500.355, ' 99.00 ') Result: error, because the template is 99.00, that is to 10 bits, and 500.355 exceeds the number of digits of the template.