SELECT ROUND(SIN(PI()),2); // Output is 0.00
SELECT SIN(PI()/2); // Output is 1
SELECT ROUND(SIN(PI()/3),2); // Output is 0.87
We used ROUND() to show only two decimal places. SELECT SIN( X )
X is in Radian Radians function convert degree value to radian.
SELECT SIN(RADIANS(0)); // Output is 0 SELECT SIN(RADIANS(90)); // Output is 1 SELECT ROUND(SIN(RADIANS(180)),2); // Output is 0.00SQL Math References COS() TAN() to get tangent
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.