How to use Oracle LOWER () and UPPER () Functions

Source: Internet
Author: User

How to use Oracle LOWER () and UPPER () Functions

The Rows returned in one column are case insensitive.
This is a common practice to make columns case-insensitive to ensure that you want to return all rows.
 

SELECT *
FROM COURSES
Where lower (education_delivery_method) = 'classroom'


You can use Oracle's UPPER () or LOWER () function to select a format column in your SQL

SELECT
UPPER (FIRSTNAME) AS "FIRSTNAME ",
LASTNAME
FROM STUDENTS
WHERE RowNum <11

 

Use the up/down function for the format Column
It can use the Oracle UPPER () or LOWER () function with string () to complete different types of formats.

 

SELECT
UPPER (SUBSTR (LASTNAME, 1, 1) | LOWER (SUBSTR (LASTNAME, 2, 29 ))
FROM STUDENTS
WHERE RowNum <11

Update the changes of a group of rows
It can be used together with the UPPER () or LOWER () function of an update statement Oracle to change a group of rows in the case.


UPDATE STUDENTS
Set lastname = UPPER (LASTNAME)
Where lastname = 'Jones'
/

Commit work;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.