Oracle's in-depth analysis of the case sensitivity of image names

Source: Internet
Author: User
Tags lowercase

ORACLE an in-depth analysis of the sensitivity of image names to case sensitive Note: 1,   This article is based on ORACLE9.2 for test Analysis version 2,   The Oracle reference name mentioned in this article includes the table name, view name, field name, function name, and so on in Oracle.   In general, Oracle development or management does not distinguish between Oracle's case-name capitalization, because Oralce will normally convert all lowercase to uppercase for processing, so it can be said to be case insensitive. But the actual Oracle has its own set of complete image name processing methods. This paper will analyze and discuss the processing mechanism of Oracle's sensitivity to the case of image names from examples.   Maybe some people have learned in their work that Oracle can quote when creating a pair, and that you can't use special characters without quotes, only names that start with a letter. If you add quotes, you can use any character in the name of the image, including the beginning of the digits, underscores, commas, and so on. When you export a SQLSERVER2000 to create a script that is typically quoted, it is often said that the script does not have access to the image after it has been run in Oracle.   Below is the author of the creation of tables and access to use a different naming method of an example, is the author of the Machine test results:   Connected to oracle9i Enterprise Edition release 9.2.0.7.0 Connected as * * *   sql> CREATE TABLE Mytable1  2  ( 3     C1 VARCHAR2 (6)  4&N BSP;); Table created sql> select * from "MYTABLE1"; C1------sql> SELECT * from MYtable1; C1------sql> SELECT * from "Mytable1"; SELECT * from "Mytable1" ORA-00942: Table or view does not exist sql> drop table mytable1; Table dropped sql> sql> sql> CREATE TABLE "Mytable1"  2  ( 3     C1 VARCHAR2 (6) &NB sp;4 ); Table Created sql> SELECT * from "Mytable1"; C1------sql> SELECT * from Mytable1; SELECT * FROM Mytable1 ORA-00942: Table or view does not exist sql> select * from MYTABLE1; SELECT * FROM MYTABLE1 ORA-00942: Table or view does not exist     The following table is a summary of the author's test results:√ Indicates that access is allowed, and X indicates that access is not allowed. Instance:

Read creation Mytable1 MYTABLE1 "Mytable1" "MYTABLE1"
Mytable1 x
MYTABLE1 x
"Mytable1" x x x
"MYTABLE1" x
Summary Conclusion:

Read creation lowercase letters Capital Quote Small Letter Quote Capital Letter
lowercase letters x
Capital x
Quote Small Letter x x x
Quote Capital Letter x
The following is based on the author of Oracle data Dictionary and actual test summary Analysis conclusion:Oracle converts a lowercase letter to uppercase letters in the data dictionary when it is created, such as MyTable, which is converted to mytable, if the quotation marks are created, and the actual characters in quotation marks are stored. When accessed without quotes, lowercase letters are converted to uppercase letters for further access, such as mytable to MyTable, or the actual characters within quotation marks if the quotes are added.   When Oracle reads a data dictionary, it finds that characters with lowercase letters or letters other than alphabetic characters are considered to be case sensitive and require quotation marks when they are accessed. Ye Zhengxing (mking) 2007-7-29

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.