Introduction Up till SQL Server 2012, the LOG function only supported the natural log. But from SQL Server 2012, the LOG function started to accept the base value (as the second parameter) as well.
Syntax
Number: It is the positive number for which we want the logarithm
Base: It is the base of the logarithm. Default value is 10.
Return Type: Decimal number
Example:
-- 2.07944154167984 SELECT LOG(8,3) --Output -- 1.89278926071437 |