<<<<<<< HEAD pi | H2 | SQLDoc
Skip to main content

pi

1. PI Function

======= pi | H2 Function | SQLDoc

pi

1. PI Function

>>>>>>> 9d19b1c8cb744c8e86d5c15b74d8b5f719ad62be

The PI function in H2 database is used to retrieve the numerical value of the mathematical constant π (pi).

2. Syntax

The syntax for the PI function in H2 database is as follows:

PI()

Arguments

  • The PI function does not require any arguments.

Return

  • The PI function returns the numerical value of π (pi).

3. Notes

  • The PI function in H2 database does not accept any arguments and always returns the same value, which is approximately 3.141592653589793.
  • The returned value is of type DOUBLE.

4. Examples

Here are a few examples demonstrating the usage of the PI function in H2 database:

Example 1 - Retrieving the value of π:

SELECT PI() AS pi_value;

Output:

pi_value
-------------------
3.141592653589793

Example 2 - Using π in a mathematical calculation:

SELECT PI() * 2 AS circumference
FROM DUAL;

Output:

circumference
-------------------
6.283185307179586

There are no direct related functions to the PI function in H2 database. However, you can use the PI value in conjunction with various mathematical functions and calculations.