LOG() Function in SQL Server Last Updated : 29 Sep, 2020 Comments Improve Suggest changes Like Article Like Report The LOG() function returns the logarithm of a specified number or the logarithm of the number to the specified base. Syntax : LOG(number, base) Parameter : LOG() function accepts two-parameters as mentioned above and described below. number - This parameter hold a number which is greater than 0. base - It is the optional integer argument that sets the base for the logarithm. Returns - It returns the logarithm of the specified number with specified base. Example-1 : Return the natural logarithm of 4. SELECT LOG(4); Output : 1.3862943611198906 Example-2 : It will Return the natural logarithm of 3 to a specified base 6. SELECT LOG(3, 6); Output : 0.61314719276545848 Example-3 : When the PI() function passing one of the arguments with specified base 5. SELECT LOG(PI(), 5); Output : 0.71126066871266902 Example-4 : When the argument passing as a expressions with specified base. SELECT LOG(3 + 2, 5); Output : 1.0 Example-5 : Both LOG and LOG10 having base 10. SELECT LOG(1000, 10) 'LOG', LOG10(1000) 'LOG10'; Output : | LOG | LOG10 | |-------+--------| | 3 | 3 | Comment More infoAdvertise with us Next Article LOG() Function in SQL Server S sanjoy_62 Follow Improve Article Tags : SQL DBMS-SQL SQL-Server Similar Reads LOG10() Function in SQL Server This function returns the logarithm of a number to base 10. Syntax : LOG10(number) Parameter : This method accepts a single-parameter as mentioned above and described below. number - This parameter hold a number which is greater than 0. Returns - It returns the base-10 logarithm of the specified num 1 min read MONTH() Function in SQL Server MONTH() function : This function in SQL Server is used to return the month of the year i.e, from 1 to 12 for a date stated. Features : This function is used to find the month of the year for a date specified. This function comes under Date Functions. This function accepts only one parameter i.e, dat 2 min read LTRIM() Function in SQL Server The LTRIM() function in SQL Server removes all the space characters found on the left-hand side of the string. It removes the leading spaces from a string, SyntaxThe LTRIM function for SQL Server syntax is: LTRIM(string, [trim_string]) Parameter: string - The string from which the leading space char 2 min read SQL Server ISNULL() Function The ISNULL() function in SQL Server is a powerful tool for handling NULL values in our database queries. It allows us to replace NULL values with a specified replacement value, ensuring that your queries return meaningful results even when data is missing.In this article, We will learn about the SQL 3 min read NULLIF() Function in SQL Server NULLIF() function in SQL Server is used to check if the two specified expressions are equal or not. If two arguments passed to a function are equal, the NULLIF() function returns Null to us. NULLIF() function operates like a Like a CASE Statement. It will return the value of the first argument if th 3 min read Like