Overview
SIN() is a numeric function that returns the trigonometric sine value of a specified angle in radians.
Syntax
The syntax of theSIN() function is as follows.
SIN() function requires one argument:
x: A positive or a negative angle (or an expression that evaluates to an angle).
Examples
Case #1: Sine a Positive Value
The example below will use theSIN() function with a positive angle as the argument.
Case #2: Sine a Negative Value
The following example shows theSIN() function with a negative angle as the argument.
Case #3: Sine a Fraction Value
The following example shows theSIN() function with a fractional value as the argument.
Case #4: Sine With an Expression
TheSIN() function can also include an expression, as shown in the example below:
Case #5: Using the SIN() Function With a Table
In the following example, we will combine SIN() function with CREATE TABLE statement to obtain the sine values of a specific column.
- Create a new table named sineTable containing the initialValue column. Input some values with the negative and positive angles into the column.
- Run the query below to get the output of a sine value:
- The final result will have the initialValue column with the source value and the sinValue column with their calculated sine values.