We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Underscore Operator

As discussed, the % wildcard operator matches zero or more characters. The _ wildcard operator, on the other hand, matches only a single character.

SELECT * FROM products
WHERE product_name LIKE '_oot';

The query above matches products like:

  • boot
  • root
  • foot
SELECT * FROM products
WHERE product_name LIKE '__oot';

The query above matches products like:

  • shoot
  • groot

Assignment

HR has been able to narrow down their query further! They want a report of all user data from the users table for users whose names start with Bo and are exactly 5 characters long.