How is the oracle case conversion function used?
There are three functions in Oracle for converting case: UPPER, LOWER, and INITCAP.
- UPPER
SELECT UPPER('hello') FROM dual; -- 输出结果为 'HELLO'
- Decrease
SELECT LOWER('HELLO') FROM dual; -- 输出结果为 'hello'
- 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.