Section 3 — String WHERE Operators

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:54 PM on 9/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

How do you compare an exact text value in WHERE?

Use =. Example: WHERE State = 'Utah'.

2
New cards

How do you exclude an exact text value?

Use != or <>. Example: WHERE State != 'Utah'.

3
New cards

What does <> mean in SQL?

Not equal to; it works like != in many DBMS engines.

4
New cards

What does ILIKE do?

Performs a case-insensitive text comparison. Example: WHERE Name ILIKE 'isla'.

5
New cards

What does NOT ILIKE do?

Excludes text case-insensitively. Example: WHERE Name NOT ILIKE 'imani'.

6
New cards

LIKE vs. ILIKE

LIKE is case-sensitive when the DBMS treats case as significant; ILIKE is case-insensitive.

7
New cards

What does % mean in a LIKE condition?

A wildcard representing zero or more characters.

8
New cards

Example: names beginning with Fred

WHERE Name LIKE 'Fred%'

9
New cards

What names can LIKE 'Fred%' match?

Fred, Freddy, Freda, or any value that starts with Fred.

10
New cards

How do you find names ending in “son”?

WHERE Name LIKE '%son'

11
New cards

How do you find text containing “Lake”?

WHERE City LIKE '%Lake%'

12
New cards

What does IN (…) do with strings?

Matches a text value in a list. Example: WHERE State IN ('Utah', 'Nevada').

13
New cards

Can you use wildcards inside IN (…)?

No. Use LIKE for wildcard matching.

14
New cards

Example: customers in Utah or Nevada

SELECT Name, State FROM Customer WHERE State IN ('Utah', 'Nevada');

15
New cards

Example: customers not in Utah or Nevada

SELECT Name, State FROM Customer WHERE State NOT IN ('Utah', 'Nevada');

16
New cards

What quotation marks should surround text values in standard SQL?

Single quotes. Example: WHERE State = 'Utah'.