In a course that I am following on SQL server, I have seen the use of round() to check the decimals of a specific field; This field is called haber, and they use it in the following way haber-round(haber,2)
At first, despite not understanding that use, I thought it was equivalent to round(haber,2)
dry, but you return me a number of different records. I have searched for information about it, but nothing. Can you give me a cable? Thank you very much.
Subtracting a value from the same value but rounded will give the difference that was generated by rounding. This can help for various calculations or to verify that the numbers did not have extra decimals than they should.
The simplest thing is to show an example with what happens. I leave the example with one value that rounds up, another rounds down, and the last one doesn't need to round.