Skip to main content

Overview

SIN() is a numeric function that returns the trigonometric sine value of a specified angle in radians.

Syntax

The syntax of the SIN() function is as follows.
The 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 the SIN() function with a positive angle as the argument.
It will return the sine value of 5.

Case #2: Sine a Negative Value

The following example shows the SIN() function with a negative angle as the argument.
The output will be as follows.

Case #3: Sine a Fraction Value

The following example shows the SIN() function with a fractional value as the argument.
The output will be as follows.

Case #4: Sine With an Expression

The SIN() function can also include an expression, as shown in the example below:
You will get the following output:

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.
  1. Create a new table named sineTable containing the initialValue column. Input some values with the negative and positive angles into the column.
  1. Run the query below to get the output of a sine value:
  1. The final result will have the initialValue column with the source value and the sinValue column with their calculated sine values.