Manipulating strings
The company has launched a platform for customers. You've been asked to generate a username that's easy for customers to remember and for employees to interpret. You decide a username should be composed of these characters in lowercase and in the following order:
- First four letters of
LastName - All characters of the
CustomerId
Latihan ini adalah bagian dari kursus
Introduction to Oracle SQL
Petunjuk latihan
- Output a new column called
Usernameusing the concatenation function. - Get the necessary letters from
LastNameusing the substring function. - Add the
CustomerIdtoLastName.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- Output a new column called Username
SELECT LastName, CustomerId, ___(
-- First four letters of LastName
___,
-- CustomerId
___
) AS ___
FROM ___