Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle In Operator

The Oracle IN operator helps you to reduce the use of multiple OR conditions in a SELECT, INSERT, UPDATE, or DELETE statement.

Oracle IN OPERATOR Syntax

To reduce the use of multiple OR conditions, use the following syntax:

Syntax

SELECT col1, col2,....
FROM tablename
WHERE expression IN (value1, value2, ...);

Parameters:

expression : The specified value to test.

value1, value2: Values to test against expression.

Oracle IN OPERATOR example

The following Oracle, IN operator is used reduce the use of multiple OR conditions. If any of these values matches expression, then the IN operator will evaluate to true:

Example

SELECT firstName, lastName, address 
FROM tblCustomerLoan
WHERE firstName IN ('Yogesh', 'Mahesh');

Note:

In the above example, we are performing IN operator to test the multiple values against expression.