SQL EXP Function

Savigo
You organize your data. Now organize your savings.
Set savings goals, track your progress, and stay on course.
Get Savigo for iPhone 

The SQL EXP function return e raised to the nth power, where e is the base of the natural logarithm i.e. equal to approximately 2.71828183.

Syntax #

EXP(number | expression)

Arguments #

number | expression
is the nth power which can be an integer or a float, either negative or positive is accepted

Return Type #

The EXP function returns a float number with the precision that depends on each RDBMS implementation.

Examples #

The following statement returns the exponential value of the 10.

SELECT EXP(10);
       exp
------------------
 22026.4657948067
(1 row)

The EXP is the inverse function of the LN function, therefore, the following statement returns 100 in both expressions:

SELECT EXP( LN(100)), LN( EXP(100));
 exp | ln
-----+-----
 100 | 100
(1 row)

Was this helpful?