Multiple choice technology programming languages

Mark the correct statements ?

  1. LIKE '%XXX%'

  2. LIKE 'XXX'

  3. LIKE XXX

  4. LIKE NULL

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

Both patterns are valid SQL LIKE syntax. LIKE '%XXX%' matches any string containing 'XXX' (the wildcards match any characters). LIKE 'XXX' matches only the exact string 'XXX' - no wildcards means exact match. Options C and D are invalid: LIKE XXX lacks quotes around the pattern, and LIKE NULL is incorrect syntax (you'd use IS NULL for checking null values).