Difference between revisions of "SIN"

From SQLZOO
Jump to: navigation, search
(Created page with "<table align='right' border='1'> <caption>Compatibility</caption> <tr><th colspan='3'>SIN(s1 IN s2)</th></tr> <tr><td align='center'>'''Engine'''</td><td align='center'>'''OK'...")
 
Line 10: Line 10:
 
</table>
 
</table>
 
<h1>SIN</h1>
 
<h1>SIN</h1>
<p>COS(f) returns the cosine of f where f is in radians.</p>
+
<p>SIN(f) returns the sine of f where f is in radians.</p>
 
<p></p>  
 
<p></p>  
 
<pre style='width:50ex'>
 
<pre style='width:50ex'>
   COS(3.14159/3) -> 0.5  
+
   SIN(3.14159/6) -> 0.5
 
</pre>
 
</pre>
  
 
<div class='qu'>
 
<div class='qu'>
In this example you return the cosine of each of the angles.  
+
In this example you return the sine of each of the angles.  
 
<source lang='sql' class='def'>
 
<source lang='sql' class='def'>
 
SELECT id,
 
SELECT id,
       COS(th)
+
       SIN(th)
 
   FROM angle
 
   FROM angle
 
</source>
 
</source>
Line 27: Line 27:
 
<p>See also</p>
 
<p>See also</p>
 
<ul>
 
<ul>
   <li>[[SIN function]]</li>
+
   <li>[[COS |COS function]]</li>
 
   <li>[[TAN function]]</li>
 
   <li>[[TAN function]]</li>
 
   <li>[[ATAN function]]</li>
 
   <li>[[ATAN function]]</li>
 
</ul>
 
</ul>

Revision as of 09:49, 16 July 2012

Compatibility
SIN(s1 IN s2)
EngineOKAlternative
ingresYes
mysqlYes
oracleYes
postgresYes
sqlserverYes

SIN

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

  SIN(3.14159/6) -> 0.5  

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

SELECT id,
       SIN(th)
  FROM angle

See also

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense