CodePudding user response:
SELECT POWER (2, 3) AS [POWER 2 ^ 3)
, POWER (2.5, 3) AS [POWER 2.5 ^ 3]
, POWER (CAST (2.5 AS a DECIMAL (10, 5)), 3) AS [POWER (CAST (2.5 AS a DECIMAL (10, 5)), 3)]
, 2.5 * 2.5 * 2.5 AS [2.5 * 2.5 * 2.5]
You are paraphrased, speculation is:
If base is not the integer, pow function may have a problem on the precision, so in this case, do not use pow,
But you see, if you can take the bottom into the precision is higher, the decimal calculation result is also no problem,
CodePudding user response:
Thank you my sister I will continue to work hard