On January 28th at 9:00 UTC Academy will be unavailable for 10 minutes due to planned maintenance break.
Kickstart 2020 with new opportunities! - hours only!Up to 80% off on all courses and bundles.-Close
Simple text functions
How to modify Strings
21. The REVERSE() function


Nice! The next text function we'll try is REVERSE(). This takes a string as a parameter and returns its characters in reverse order.

Here we have a query that reverses the order of item names:

FROM Item;

As you can see, it's a pretty simple function to use.



The marketing agency is organizing a costume party for all the copywriters. Each copywriter will be given a name tag with their first name spelled backwards.

Let's reverse the first name of each copywriter whose ID is less than 5. Show the copywriter's real first name and their "reversed" first name. Name the last column Nickname.

Stuck? Here's a hint!

Use REVERSE(FirstName) and Id < 5 in WHERE.