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 AND Operator

The Oracle AND operator is used to test two or more conditions in a SELECT, INSERT, UPDATE, or DELETE statement. The AND operator returns false if one of the two expressions evaluate to false.

Oracle AND OPERATOR Syntax

To filter records based on more than one condition, use the following syntax:

Syntax

SELECT col1, col2, ...
FROM tablename
WHERE condition1 AND condition2 AND condition3 ...;  

Parameters:

tablename: The table name from which you want to fetch the records.

condition: To specifies multiple conditions that must be true to select records.

Oracle AND OPERATOR example

The following Oracle statement is used to filter records based on more than one condition is TRUE:

Example

SELECT firstName, lastName, address 
FROM tblCustomerLoan 
WHERE cellNo = 7897897890 AND lastName = 'Singh';

Note:

In the above example, we are showing how to use the AND operator to filter records based on more than one condition in SELECT statement.