Question
As stated earlier, multiple conditions may be combined using the OR operator. The following query shows a WHERE clause that selects rows having either a
As stated earlier, multiple conditions may be combined using the OR operator. The following query shows a WHERE clause that selects rows having either a PERSON_GIVEN_NAME column beginning with Ste or a PERSON_ ADDRESS_CITY column equal to Los Angeles. SELECT PERSON_GIVEN_NAME, PERSON_FAMILY_NAME, PERSON_ADDRESS_CITY FROM PERSON WHERE PERSON_GIVEN_NAME LIKE 'Ste%' OR PERSON_ADDRESS_CITY = 'Los Angeles';
The next query changes the OR operator from Example 4-7 to the AND operator. Note that only one row is returned now because both conditions must be true for a row to appear in the query results. SELECT PERSON_GIVEN_NAME, PERSON_FAMILY_NAME, PERSON_ADDRESS_CITY FROM PERSON WHERE PERSON_GIVEN_NAME LIKE 'Ste%' AND PERSON_ADDRESS_CITY = 'Los Angeles';
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started