PostgreSQL ATAN2() function
ATAN2() function
The PostgreSQL atan2() function is used to return the inverse tangent of a division given in the argument.
Syntax:
atan2(b,a)
PostgreSQL Version: 9.3
Pictorial presentation of PostgreSQL ATAN2() function

Example 1: PostgreSQL ATAN2() function
Code:
SELECT ATAN2(0,1) AS "Atan2 (0,1)";
Sample Output:
Atan2 (0,1) ------------- 0 (1 row)
Example 2: PostgreSQL ATAN2() function
Code:
SELECT ATAN2(1,0) AS "Atan2 (1,0)";
Sample Output:
Atan2 (1,0) ----------------- 1.5707963267949 (1 row)
Example 3: PostgreSQL ATAN2() function
Code:
SELECT ATAN2(1,-1) AS "Atan2 (1,-1)";
Sample Output:
Atan2 (1,-1) ------------------ 2.35619449019234 (1 row)
Example 4: PostgreSQL ATAN2() function
Code:
SELECT ATAN2(-3,2) AS "Atan2 (-3,2)";
Sample Output:
Atan2 (-3,2) -------------------- -0.982793723247329 (1 row)
Previous: ATAN function
Next: CBRT 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