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

Discussion

The wildcard in a WHERE clause is useful when?

  • A.An exact match is necessary in a SELECT statement.
  • B.An exact match is not possible in a SELECT statement.
  • C.An exact match is necessary in a CREATE statement.
  • D.An exact match is not possible in a CREATE statement.

Answer: B

Correct answer: An exact match is not possible in a SELECT statement.

Wildcards exist for the case where the exact value is unknown or where a pattern rather than a value is wanted - every surname beginning with "Mc", every product code with a particular third character.

Where the value is known exactly, = is both simpler and faster, since an equality test can use an index while a pattern beginning with a wildcard generally cannot. Wildcards belong to LIKE in a WHERE clause, so they have no place in a CREATE statement, which defines structure rather than selecting data.

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

Post your comment

Please log in or register to post a comment.