• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

function

SINH Function in Oracle SQL – PLSQL

October 29, 2012 by techhoneyadmin

The SINH function in Oracle SQL / PLSQL is used to calculate hyperbolic sine of numeric value where numeric value is provided in radian format.

It’s mathematically equal to SINH(N).

Syntax for the SINH function in Oracle SQL / PLSQL is:

SELECT SINH(radian)
FROM table_name;

Let’s take an example for understanding:
Suppose we want to get the hyperbolic sine of 30 degree.

SELECT SINH(30*22/(7*180))
FROM dual;

The output of the above statement will be:

SINH(30*22/(7*180))
0.548093789242759

Notice that we have changed 30 degrees into radians while passing it in SINH function.


Filed Under: function Tagged With: how to use sinh function in oracle database query, how to use sinh function in oracle plsql, how to use sinh function in oracle sql, sinh function in oracle plsql, sinh function in oracle sql, SINHPLSQL, syntax and example of sinh function in oracle database query, syntax and example of sinh function in oracle plsql, syntax and example of sinh function in oracle sql, using sinh function in oracle database query, using sinh function in oracle plsql, using sinh function in oracle sql

SIN Function in Oracle SQL – PLSQL

October 29, 2012 by techhoneyadmin

The SIN function in Oracle SQL / PLSQL is used to calculate sine of numeric value where numeric value is provided in radian format.

It’s mathematically equal to SIN(N).

Syntax for the SIN function in Oracle SQL / PLSQL is:

SELECT SIN(radian)
FROM table_name;

Let’s take an example for understanding:

Suppose we want to get the sine of 30 degree.

SELECT SIN(30*22/(7*180))
FROM dual;

The output of the above statement will be:

SIN(30*22/(7*180))
0.50018250219967

Notice that we have changed 30 degrees into radians while passing it in SIN function.


Filed Under: function Tagged With: how to use sin function in oracle database query, how to use sin function in oracle plsql, how to use sin function in oracle sql, sin function in oracle plsql, sin function in oracle sql, SINPLSQL, syntax and example of sin function in oracle database query, syntax and example of sin function in oracle plsql, syntax and example of sin function in oracle sql, using sin function in oracle database query, using sin function in oracle plsql, using sin function in oracle sql

COSH Function in Oracle SQL – PLSQL

October 29, 2012 by techhoneyadmin

The COSH function in Oracle SQL / PLSQL is used to calculate hyperbolic cosine of numeric value where numeric value is provided in radian format.

It’s mathematically equal to COSH(N).

Syntax for the COSH function in Oracle SQL / PLSQL is:

SELECT COSH(radian)
FROM table_name;

Let’s take an example for understanding:

Suppose we want to get the hyperbolic cosine of 30 degree.

SELECT COSH(30*22/(7*180))
FROM dual;

The output of the above statement will be:

COSH(30*22/(7*180))
1.14035380553865

Notice that we have changed 30 degrees into radians while passing it in COSH function.


Filed Under: function Tagged With: cosh function in oracle plsql, cosh function in oracle sql, COSHPLSQL, how to use cosh function in oracle database query, how to use cosh function in oracle plsql, how to use cosh function in oracle sql, syntax and example of cosh function in oracle database query, syntax and example of cosh function in oracle plsql, syntax and example of cosh function in oracle sql, using cosh function in oracle database query, using cosh function in oracle plsql, using cosh function in oracle sql

COS Function in Oracle SQL – PLSQL

October 29, 2012 by techhoneyadmin

The COS function in Oracle SQL / PLSQL is used to calculate cosine of numeric value where numeric value is provided in radian format.

It’s mathematically equal to COS(N).

Syntax for the COS function in Oracle SQL / PLSQL is:

SELECT COS(radian)
FROM table_name;

Let’s take an example for understanding:
Suppose we want to get the cosine of 30 degree.

SELECT COS(30*22/(7*180))
FROM dual;

The output of the above statement will be:

COS(30*22/(7*180))
0.86592001044743

Notice that we have changed 30 degrees into radians while passing it in COS function.


Filed Under: function Tagged With: cos function in oracle plsql, cos function in oracle sql, COSPLSQL, how to use cos function in oracle database query, how to use cos function in oracle plsql, how to use cos function in oracle sql, syntax and example of cos function in oracle database query, syntax and example of cos function in oracle plsql, syntax and example of cos function in oracle sql, using cos function in oracle database query, using cos function in oracle plsql, using cos function in oracle sql

IN Function in Oracle SQL – PLSQL

October 24, 2012 by techhoneyadmin

The IN function in Oracle SQL / PLSQL is like using multiple OR conditions at once.

Oracle SQL / PLSQL Syntax for IN function in Oracle SQL SELECT Statement is:

SELECT column_name(s)
FROM table_name
WHERE column_name IN(value1, value2 . . . valueN);

Or

Oracle SQL / PLSQL Syntax for IN function in Oracle SQL INSERT Statement is:

INSERT INTO table_name
VALUES(column_name1
,colum_name2
,column_name3
.
.
column_nameN)
WHERE column_name IN(value1, value2 . . . valueN);

Or

Oracle SQL / PLSQL Syntax for IN function in Oracle SQL UPDATE Statement is:

UPDATE table_name
SET (column_name1 = value/expression
,column_name2 = value/expression
, column_name3 = value/expression
.
.
)
WHERE column_name IN(value1, value2 . . . valueN)
;

Or

Oracle SQL / PLSQL Syntax for IN function in Oracle SQL DELETE Statement is:

DELETE FROM table_name
WHERE column_name IN(value1, value2 . . . valueN);

Let’s take an example for understanding:

Suppose have a table named ‘employee’ in the database as shown below.

Employee_ID Employee_Name Salary Department Commission
101 Emp A 10000 Sales 10
102 Emp B 20000 IT 20
103 Emp C 28000 IT 20
104 Emp D 30000 Support
105 Emp E 32000 Sales 10

Example 1: Using Oracle SQL / PLSQL IN Function in SQL SELECT Statement

Suppose we want to see the records of employee(s) working either in ‘Sales’ or ‘IT’ department.

The same can be achieved as:

SELECT *
FROM employee
WHERE department IN ('Sales','IT');

The result of the above query will be:

Employee_ID Employee_Name Salary Department Commission
101 Emp A 10000 Sales 10
102 Emp B 20000 IT 20
103 Emp C 28000 IT 20
105 Emp E 32000 Sales 10

The example of Oracle SQL IN Function above shows that we have retrieved the records pertaining to employee(s) working either in ‘Sales’ or ‘IT’ department using IN function in WHERE clause


Example 2: Using Oracle SQL / PLSQL IN Function with numbers.

IN function can also be used with numbers.

Let’s assume that we have a new table namely ‘employee’ as shown below:

Employee_ID Employee_Name Salary Department Commission
101 Emp A 10000 Sales 10
102 Emp B 20000 IT 20
103 Emp C 28000 IT 20
104 Emp D 30000 Support
105 Emp E 32000 Sales 10

Suppose we want to view all the records of employees who are having Salary = ‘20000’, or Salary = ‘32000’.

We can achieve the same as using the SQL SELECT Statement with SQL IN Function as:

SELECT *
FROM employee
WHERE salary IN (20000,32000);

Once we have run the above code following will be the result:

Employee_ID Employee_Name Salary Department Commission
102 Emp B 20000 IT 20
105 Emp E 32000 Sales 10

By using the IN Function in the example above we have successfully retrieved the records pertaining to employees who having Salary = ‘20000’, or Salary = ‘32000’.


Example 3:

Oracle SQL /IN function can also be used with other conditions.

Let’s assume that we have a new table namely ‘employee’ as shown below:

Employee_ID Employee_Name Salary Department Commission
101 Emp A 10000 Sales 10
102 Emp B 20000 IT 20
103 Emp C 28000 IT 20
104 Emp D 30000 Support
105 Emp E 32000 Sales 10

Suppose we want to view all the records of employees who are having Salary = ‘20000’, or Salary = ‘32000’ and working in ‘Sales’ department.

We can achieve the same using Oracle SQL IN Function in SELECT SQL Statement with WHERE Clause as:

SELECT *
FROM employee
WHERE department = 'Sales'
AND salary IN (20000,32000);

Once we have run the above code following will be the result:

Employee_ID Employee_Name Salary Department Commission
105 Emp E 32000 Sales 10

Above example shows Oracle SQL /PLSQL IN Function successfully to retrieving the records pertaining to employees who having Salary = ‘20000’, or Salary = ‘32000’ and working in ‘Sales’ department using the IN function in combination with WHERE clause.


Filed Under: function Tagged With: how to use in function in oracle sql, INPLSQL, oracle sql in function syntax and example, oracle sql plsql in function

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 24
  • Page 25
  • Page 26
  • Page 27
  • Go to Next Page »

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in