# Difference between revisions of "SIN"

From SQLZOO

Line 36: | Line 36: | ||

<ul> | <ul> | ||

<li>[[COS |COS function]]</li> | <li>[[COS |COS function]]</li> | ||

− | <li>[[TAN function]]</li> | + | <li>[[TAN |TAN function]]</li> |

</ul> | </ul> |

## Latest revision as of 10:56, 16 July 2012

SIN(s1 IN s2) | ||
---|---|---|

Engine | OK | Alternative |

ingres | Yes | |

mysql | Yes | |

oracle | Yes | |

postgres | Yes | |

sqlserver | Yes |

# SIN

SIN(f) returns the sine of f where f is in radians.

SIN(3.14159/6) -> 0.5

schema:scott

DROP TABLE angle

CREATE TABLE angle( id INTEGER, angle FLOAT); INSERT INTO angle VALUES (0,1); INSERT INTO angle VALUES (1,0.7853); INSERT INTO angle VALUES (2,0.5235); INSERT INTO angle VALUES (3,1.0471);

In this example you return the sine of each of the angles.

SELECT id, angle, SIN(angle) FROM angle

See also