The
UPPER
and
LOWER
Functions
The UPPER and LOWER functions return the input string with all uppercase or lowercase characters,
respectively.
Syntax
UPPER(string), LOWER(string)
For example, the following code returns ‘ITZIK BEN-GAN’.
SELECT UPPER('Itzik Ben-Gan');
The following code returns ‘itzik ben-gan’.
SELECT LOWER('Itzik Ben-Gan');
The
RTRIM
and
LTRIM
Functions
The RTRIM and LTRIM functions return the input string with leading or trailing spaces removed.
Syntax
RTRIM(string), LTRIM(string)
If you want to remove both leading and trailing spaces, use the result of one function as the input
to the other. For example, the following code removes both leading and trailing spaces from the input
string, returning ‘abc’.
SELECT RTRIM(LTRIM(' abc '));
www.it-ebooks.info
Do'stlaringiz bilan baham: |