SIN() function

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.

Syntax
SELECT SIN( X )
X is in Radian

SIN() with PI()

mathematical constant PI() (π) value is 3.141593

SIN() with RADIANS

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.00
SQL Math References COS() TAN() to get tangent
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com

    Post your comments , suggestion , error , requirements etc here





    SQL Video Tutorials










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