TAN() function

SELECT ROUND(TAN(PI()),2); // Output is -0.00
SELECT TAN(PI()/2); // Output is 1.6331239e+16 or infinity 
SELECT ROUND(TAN(PI()/3),2); // Output is 1.73 
We used ROUND() to show only two decimal places.
SELECT TAN( X )
X is in Radian

TAN() with PI()

mathematical constant PI() (π) value is 3.141593

TAN() with RADIANS

Radians function convert degree value to radian.

SELECT TAN(RADIANS(0)); // Output is 0
SELECT TAN(RADIANS(45)); // Output is 1 
SELECT TAN(RADIANS(90)); // Output is infinity or 1.63312393531954e+016
SELECT ROUND(TAN(RADIANS(180)),2); // Output is -0.00
SQL Math References COT() Average value Query
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