Comparison of the size of strings in Oracle, comparison and operation of strings to numbers

Source: Internet
Author: User
The Oracle comparison string is based on the ASCII code, the first letter of the ASCII size comparison if the equivalence is then compared to the next, and so on. The manipulation of strings and numbers is reported as unusual, because different types cannot be compared. Oracle sometimes automatically converts when executing SQL, for example: SELECT * from Chan_customer cc where cc.customer_id = ' 1 '; even if the customer_id is a digital type, it can be traced. However, Oracle distinguishes between characters and numbers by adding non-single quotes.
        To verify that the string comparisons in Oracle are compared by ASCII code, make a simple validation example.        

Select ASCII (' a '), ASCII (' 888 ') from dual;
      Summary:  hands-on implementation of the following, the results will be more impressive!

Comparison of the size of strings in Oracle, comparison and operation of strings to numbers

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.