Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Simple text functions
How to modify Strings


Right! Let's move on to another text function: LOWER().

Whatever is passed in as an argument to LOWER() will be written in small (lowercase) letters:

  LOWER(LastName) AS LowerName
FROM Copywriter;

LOWER() returns 'turner' for 'Turner'.

If there is a function for lowercase letters, there must be a function for capital (uppercase) letters too. There is! It's called UPPER() and works in a similar way:

  UPPER(LastName) AS UpperName
FROM Copywriter;

UPPER() returns 'TURNER' for the last name 'Turner'.

Shall we try this in an exercise?


The boss of the marketing agency heard that it's very trendy to write magazine and newspaper ads in all lowercase letters. We don't want to re-enter all our slogans; let's use LOWER() instead.

For every slogan of the type N'newspaper ad' or N'magazine ad', show the slogan ID and its text in all lowercase. Name the last column TrendySlogan.

Stuck? Here's a hint!

Use two conditions in the WHERE clause, joined with OR. Use LOWER() in the SELECT.