Char Oracle | Character Functions - oracle tutorial - sql tutorial
What is Oracle Character functions ?
- Character functions operate on values of data type CHAR or VARCHAR.
- Oracle character functions are used to modify a char or varchar2 column.
- You may need to modify a column before comparing it to another value, or you may need it in a different format than it is stored in the database.
LOWER:
- Returns a given string in lower case.
Example:
Screenshot:
- In this table “wikitechy_char” , the text ‘LAKSHMI’ is in upper case.
- LOWER(‘LAKSHMI’) function is being used to show the name in lower case from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully modified the text LAKSHMI from upper case to lower case “lakshmi”.
UPPER:
- Returns a given string in upper case.
Example:
Screenshot:
- In this table “wikitechy_char” , the text ‘venkat’ is in lower case.
- UPPER (‘venkat’) function is being used to show the name in upper case from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully modified the text venkat from lower case to upper case “VENKAT”.
INITCAP:
- Returns a given string with Initial letter in capital.
Example:
Screenshot:
- In this table “wikitechy_char” , the text ‘venkat’ is in lower case.
- INITCAP (‘venkat’) function is being used to show the name of the first letter is in upper case from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully modified the text venkat into “Venkat”.
oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , plsql
LENGTH:
- Returns the length of a given string.
Example:
Screenshot:
- In this table “wikitechy_char” , the text ‘Vinoth Kumar’ is shown.
- LENGTH (‘Vinoth Kumar’) function is being used to show the length of the given words from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully Show the length of the word.
SUBSTR:
- Returns a substring from a given string. Starting from position p to n characters.
Example:
Screenshot:
- SUBSTR (‘Vinoth Kumar’) function is being used to show the length of the given words from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully Show the length of the word.
oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , plsql
INSTR:
- Tests whether a given character occurs in the given string or not.
- If the character occurs in the string then returns the first position of its occurrence otherwise returns 0.
Screenshot:
- INSTR (‘Vinoth Kumar’) function is being used to show the length of the given words from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully Show the length of the word.
REPLACE:
- Replaces a given set of characters in a string with another set of character.
Example:
Screenshot:
- REPLACE (‘Arun’,‘Vinoth’) function is being used to show the length of the given words from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully Show the length of the word.
oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , plsql
CONCAT:
- Combines a given string with another string.
Example:
Screenshot:
- SUBSTR (‘Vinoth Kumar’) function is being used to show the length of the given words from the table “wikitechy_char”.
- Clicking on the Run button the query is executed.
- We can see the row which has been successfully Show the length of the word.