How is the oracle case conversion function used?

There are three functions in Oracle for converting case: UPPER, LOWER, and INITCAP.

  1. UPPER
SELECT UPPER('hello') FROM dual; -- 输出结果为 'HELLO'
  1. Decrease
SELECT LOWER('HELLO') FROM dual; -- 输出结果为 'hello'
  1. Capitalize the first letter of each word.
SELECT INITCAP('hello world') FROM dual; -- 输出结果为 'Hello World'

You can use these functions to convert the case of strings in a SELECT statement, or to update data in a table in an UPDATE statement.

Leave a Reply 0

Your email address will not be published. Required fields are marked *