SIN(X) returns the sine of X, where X is in radians.
SELECT ROUND(SIN(PI()), 2); -- Output: 0.00
SELECT SIN(PI() / 2); -- Output: 1
SELECT ROUND(SIN(PI() / 3), 2); -- Output: 0.87
SELECT SIN(X);
Use ROUND() for display precision and PI() for π.
SELECT SIN(RADIANS(0)); -- Output: 0
SELECT SIN(RADIANS(90)); -- Output: 1
SELECT ROUND(SIN(RADIANS(180)), 2); -- Output: 0.00
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.