Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Concatenation
Simple text functions
8. Practicing LENGTH()
Modifying strings
Summary

Instruction

Good job! Remember, you are not limited to using the LENGTH() or other text functions in the SELECT clause only. You can use text functions in WHERE too! This allows you to select only rows with text of length greater or smaller than some value. For instance:

SELECT
  id,
  text
FROM slogan
WHERE LENGTH(text) > 45;

The above query will select only those slogans whose length is greater than 45 characters.

Exercise

Show the IDs of all items with a name longer than 8 characters.

Stuck? Here's a hint!

Use LENGTH(name) > 8 as the condition.