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

Source: Internet
Author: User

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

A column returns rows that 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 the Oracle upper () or LOWER () function to select Format columns in your SQL

SELECT
UPPER (FIRSTNAME) as "FIRSTNAME",
LASTNAME
From STUDENTS
WHERE RowNum <

Format one column use up and down features
It can use the Oracle UPPER () or LOWER () function functions with the string () to complete different types of formatting.

SELECT
UPPER (SUBSTR (lastname,1,1)) | | LOWER (SUBSTR (lastname,2,29))
From STUDENTS
WHERE RowNum <

Update changes to a set of rows
It can be used in conjunction with an UPDATE statement Oracle's UPPER () or LOWER () function to change a set 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.