3. ORACLE
DATABASE
INDEX.HTML
/Check your answers.
1. ULYSSES MARION
2. ulysses marion
3. Paloay
4. ULYSSES MARIONPaloay
5. 14
6. alo
7. 0
1. Write your first name in uppercase letters.
2. Write your first name in lowercase letters.
3. Write your last name but capitalize only the first
letter.
4. Write your answer in #1 and #3 together.
5. Count the number of characters of your first name.
6. Write the three characters starting from the second
character of your last name.
7. What is the position of the second ’a’ in your first
name?
9. LOWER
INDEX.HTML
This function converts alpha
character values to uppercase.
UPPER
This function converts alpha
character values to lowercase.
CASE CONVERSION FUNCTIONS
ORACLE
DATABASE
10. INDEX.HTML
This function converts alpha
character values to uppercase for
the first letter of each word and all
others in lowercase.
INITCAP
/WHAT IS THIS TOPIC ABOUT?
YOUR LOGO
HERE
The words in the string is must
be separated by either # or _
or space.
13. LENGTH
INDEX.HTML
This function always appends (
concatenates ) string2 to the end
of string1.
If either of the string is NULL,
CONCAT function returns the non-
NULL argument. If both strings are
NULL, CONCAT returns NULL.
CONCAT
This function returns the length of
the input string.
/CHARACTER MANIPULATION
FUNCTIONS
YOUR LOGO
HERE
15. INSTR
INDEX.HTML
This function returns a portion of a
string from a given start point to an
end point.
SUBSTR
This function returns numeric
position of a character or a string
in a given string.
/CHARACTER MANIPULATION
FUNCTIONS
YOUR LOGO
HERE
17. ORACLE
DATABASE
INDEX.HTML
/Exercise. You will need a piece of paper.
8. Write your favorite fruit. If the number of characters is
less than 10, add * after the last letter to make it 10
characters long.
9. Write your favorite color. If the number of characters
is less than 10, add * before the first letter to make it 10
characters long.
Execute the following queries. Observe each result.
What do you think is the use of the UPPER function? LOWER? INITCAP?
LOWER and UPPER will not change any characters in the string that are not letters, since case is irrelevant for numbers and special characters, such as the dollar sign ( $ ) or modulus ( % )
LOWER and UPPER will not change any characters in the string that are not letters, since case is irrelevant for numbers and special characters, such as the dollar sign ( $ ) or modulus ( % )
Execute the following queries. Observe each result.
What do you think is the use of the UPPER function? LOWER? INITCAP?
Execute the following queries. Observe each result.
What do you think is the use of the UPPER function? LOWER? INITCAP?
If the input string is NULL, then LENGTH function returns NULL and not Zero. Also, if the input string contains extra spaces at the start, or in between or at the end of the string, then the LENGTH function includes the extra spaces too and returns the complete length of the string.
Execute the following queries. Observe each result.
What do you think is the use of the UPPER function? LOWER? INITCAP?
SUBSTR
If a substring length is not given, then SUBSTR returns all the characters till the end of string (from the starting position specified).
INSTR
Optionally, you can provide a position m to start searching, and the occurrence n of string. Also, if the starting position is not given, then it starts search from index 1, by default. If after searching in the string, no match is found then, INSTR function
Execute the following queries. Observe each result.
What do you think is the use of the UPPER function? LOWER? INITCAP?