Introduction
Concatenation
Simple text functions
9. Function lower
How to modify strings
Revision

Instruction

Right! Let's move on, there are other functions you should learn too. One of them is lower(). Whatever is put inside the parentheses of lower() will be written in small letters. For example:

SELECT lower(last_name)
FROM copywriter;
will produce 'turner' for the last name 'Turner'. Shall we try it in an exercise?

Exercise

The boss of the marketing agency heard that it's now very fashionable to write magazine and newspaper ads in small letters. Let's check that.

For every slogan of the type 'newspaper ad' or 'magazine ad', show the slogan id and its text in lower case.

Stuck? Here's a hint!

Use two conditions in the WHERE clause, joined with OR.

Console

Code editor

Result

TableConsole