Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Pi Function In Sql in SQL

Pi Function In Sql in SQL

PI() Function in SQL

The PI() function returns the mathematical constant ? (pi), approximately 3.141592653589793.


Usage

SELECT PI();

This returns the value of pi.


Example

Calculate the circumference of a circle with radius 5:

SELECT 2 * PI() * 5 AS circumference;

Result:

circumference
31.4159265359

Supported In

  • MySQL

  • SQL Server

  • PostgreSQL

  • Oracle (as PI without parentheses)


If you want, I can show you examples of other math functions in SQL!

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql