Section 9:91. String Manipulation and Case conversion and Length

1.Case Conversion Functions:

a. UPPER: Converts all characters in a string to uppercase.

Example: SELECT UPPER(‘Hello World’);

Output:` HELLO WORLD`

b. LOWER: Converts all characters in a string to lowercase.

Example: SELECT LOWER(‘Hello World’);

Output: hello world

c. INITCAP: Converts the first letter of each word in a string to uppercase.

Example: SELECT INITCAP(‘hello world’);

Output: Hello World

2.Length Calculation Functions:

a. LENGTH: Returns the number of characters in a given string.

Example: SELECT LENGTH(‘Hello World’);

Output: 11

Here is the example how we apply the function to column

Share this post