PostgreSQL LOG() function
LOG() function
The PostgreSQL log() function is used to return the base 10 logarithm of a given number or logarithm of a number for a particular base, as specified in the argument.
Syntax:
log()
PostgreSQL Version: 9.3
Pictorial presentation of PostgreSQL LOG() function

Example 1: PostgreSQL LOG() function
Code:
SELECT LOG(200.0) AS "Base 10 Logarithm";
Sample Output:
Base 10 Logarithm -------------------- 2.3010299956639812 (1 row)
Example 2: PostgreSQL LOG() function
Code:
SELECT LOG(2.0,16) AS "Base 2 Logarithm";
Sample Output:
Base 2 Logarithm -------------------- 4.0000000000000000 (1 row)
Previous: LN function
Next: MOD function
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook