SQL Tutorial SQL Advanced SQL Database SQL References

Oracle SIN() Function



The Oracle (PL/SQL) SIN() function returns trigonometric sine of an angle (angle should be in radians).

Syntax

SIN(x)

Parameters

x Required. Specify the angle in radian.

Return Value

Returns the trigonometric sine of an angle.

Example 1:

The example below shows the usage of SIN() function.

SIN(0)
Result: 0

SIN(1)
Result: .8414709848078965066525023216302989996233

SIN(-1)
Result: -.8414709848078965066525023216302989996233

SIN(2)
Result: .9092974268256816953960198659117448427

SIN(-2)
Result: -.9092974268256816953960198659117448427

Example 2:

Consider a database table called Sample with the following records:

Datax
Data 1-10
Data 2-5
Data 30
Data 45
Data 510

The statement given below can be used to calculate the trigonometric sine value of column x.

SELECT Sample.*, 
SIN(x) AS SIN_Value 
FROM Sample;

This will produce the result as shown below:

DataxSIN_Value
Data 1-10.54402111088936981340474766185137728168
Data 2-5.9589242746631384688931544061559939733579
Data 300
Data 45-.9589242746631384688931544061559939733579
Data 510-.54402111088936981340474766185137728168

❮ Oracle Functions