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

Instruction

Nice! Yet another function is INITCAP(), which will change the first letter of each word of text to upper case and the rest of the characters to lower. This is also called "title case". For instance, if someone mistakenly inserted first name as 'olivier' and last name with caps lock as 'sMITH', the query:

SELECT INITCAP(first_name || ' ' || last_name)
FROM copywriter;

will show 'Olivier Smith'. That's usually a convenient way to show names in a proper way.

Exercise

The boss wants you to update the names of all the items so that they are title cased. Show the id of each item together with its original name (as old_name) and the new name (as new_name).