ACOS() function to get arc cos of any value

SELECT ACOS(0);// Output 1.5707963267948966
SELECT ACOS(1); // Output is 0
SELECT ACOS(-2); // Output is NULL

Using ROUND() with ACOS()

SELECT ROUND(ACOS(0),2);// Output is 1.57
Syntax
SELECT ACOS( X )
The output is arc cos of X or the value for which COS() is X

This function only takes input in range of -1 to 1, for any other input the output will be NULL.

We are getting outputs in radian, so to change the value to degree we will use DEGREES()

ACOS() with DEGREES()

SELECT DEGREES(ACOS(0)); // Output is 90
SELECT DEGREES(ACOS(0)); // Output is 90 
SELECT DEGREES(ACOS(-1)); // Output is 180


SQL Math References COS() SIN() function
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com




SQL Video Tutorials










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer