Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Revision Cards

LIKE, IN, BETWEEN and NULL

LIKE, IN, BETWEEN and NULL LIKE matches patterns (% = any text, _ = one letter). IN matches a list. BETWEEN matches a range. WHERE name LIKE '_a%' = names with “a” as the second letter. WHERE email = NULL returns nothing. NULL means “unknown” and can’t be compared with =. Use IS NULL or IS NOT NULL

LIKE, IN, BETWEEN and NULL LIKE matches patterns (% = any text, _ = one letter). IN matches a list. BETWEEN matches a range. WHERE name LIKE '_a%' = names with “a” as the second letter. WHERE email = NULL returns nothing. NULL means “unknown” and can’t be compared with =. Use IS NULL or IS NOT NULL
LIKE, IN, BETWEEN and NULL · Download PNG
Read card text

What this card says

What it is

LIKE matches patterns (% = any text, _ = one letter). IN matches a list. BETWEEN matches a range.

Example

WHERE name LIKE '_a%' = names with “a” as the second letter.

Common mistake

WHERE email = NULL returns nothing.

NULL means “unknown” and can’t be compared with =. Use IS NULL or IS NOT NULL.

WildcardMeaningExample
%Zero or more characters'Pu%' → Pune
_Exactly one character'R_ja' → Raja

Learn more in the lesson: 10.7 LIKE, IN, BETWEEN and NULL

See all Ravi Sir's Cyber Security Cards