SQL AND operator in DB2 for i SQL |
The AND operator is used with SQL WHERE clause. The AND operator is used to filter data based on one or more condition.
Syntax using AND operator
SELECT column1, column2, ... FROM table_name WHERE condition1 AND condition2 ...
Example using SQL AND operator
Find out all the customers of KERALA state and KOCHI city from the Cusotmer Table
SELECT * FROM Customer WHERE CUSTSTATE = 'KERELA' and CUSTCITY ='KOCHI'
CUSTID CUSTNAME CUSTCITY CUSTSTATE CUSTCOUNTRY 4 Udeep KOCHI KERELA INDIA