Machine-translated by Google. Questions are authored in English.
Top

Discussion

The SQL keyword(s) ________ is used with wildcards.

  • A.LIKE only
  • B.IN only
  • C.NOT IN only
  • D.IN and NOT IN

Answer: A

Correct answer: LIKE only

Wildcards are meaningful only to LIKE, which performs pattern matching: WHERE name LIKE 'Sm%' finds every name beginning with those two letters.

IN and NOT IN test membership of an explicit list of values, and a wildcard inside such a list is simply a literal character with no special meaning. So WHERE state IN ('V%') matches the two-character string V% and nothing else - a mistake that fails silently, returning no rows rather than an error.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.