|
The OR operator displays a record if one of the conditions is true. an Or condition just asks SQL to look for 2 separate conditions within the same query and return any records matching either of the conditions.
Table Name ‘Users’
|
U_Id
|
FirstName
|
LastName
|
City
|
|
1
|
Ajay
|
senha
|
New York
|
|
2
|
Vinda
|
kapoor
|
Los Angeles
|
|
3
|
Qasim
|
bilal
|
New York
|
Statement:
SELECT * FROM Users
WHERE FirstName=' Ajay'
AND City='Los Angeles'
Result:
|
U_Id
|
FirstName
|
LastName
|
City
|
|
1
|
Ajay
|
senha
|
New York
|
|
2
|
Vinda
|
kapoor
|
Los Angeles
|
|