Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Concatenation
Simple text functions
7. Function length
How to modify strings
Review

Instruction

Very well done! Now that we understand the concatenation operator, let's learn some string functions. Our database provides many of these. For instance, there is a function called length(), which shows the length of a string column. For example:

SELECT length(first_name) AS first_name_length
FROM copywriter;

will show 4 for the name 'Kate', because 'Kate' consists of 4 letters.

In SQL Server this function is called len().

Exercise

For every slogan, show its id, its text, and its length. Name the last column text_length.

Stuck? Here's a hint!

Use length(text).