Mark the correct statements ?
-
LIKE '%XXX%'
-
LIKE 'XXX'
-
LIKE XXX
-
LIKE NULL
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).