SQL Trigonometry

Trigonometry

USE pubs
SET NOCOUNT ON
GO
DECLARE @degrees smallint
DECLARE @radians float
SELECT @degrees=0
SELECT @radians=0
WHILE (@degrees <= 180)
BEGIN
    SELECT
    DEGREES=@degrees,
    RADIANS=STR(@radians, 8, 5),
    SINE=STR(SIN(@radians), 8, 5),
    COSINE=STR(COS(@radians), 8, 5),
    TANGENT=STR(TAN(@radians), 8, 5)
    SELECT @degrees=@degrees + 10
    SELECT @radians=RADIANS(CONVERT(float, @degrees))
END