SIN
SIN() is a numeric function that returns the trigonometric sine value of a specified angle in radians.
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).
The example below will use the SIN() function with a positive angle as the argument.
It will return the sine value of 5.
The following example shows the SIN() function with a negative angle as the argument.
The output will be as follows.
The following example shows the SIN() function with a fractional value as the argument.
The output will be as follows.
The SIN() function can also include an expression, as shown in the example below:
You will get the following output:
In the following example, we will combine SIN() function with CREATE TABLE query 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.
2) Run the query below to get the output of a sine value:
3) The final result will have the initialValue column with the source value and the sinValue column with their calculated sine values.