Home > Database > Oracle > A brief discussion on Oracle case sensitivity issues

A brief discussion on Oracle case sensitivity issues

青灯夜游
Release: 2020-05-12 13:17:19
forward
5036 people have browsed it

This article will talk about Oracle case sensitivity. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

A brief discussion on Oracle case sensitivity issues

1. Is the database table column size sensitive?

First of all, the Oracle keywords we use There is no need to be case sensitive. For example, CREATE or create to create a table are equivalent.

It should be noted that the prerequisite for Oracle's case insensitivity is that no quotation marks are used "Under the premise!!!

For example, the table structures created by the following sql are all the same, all in uppercase (that is, it is often said that Oracle is not case-sensitive, and the default is is uppercase)

A brief discussion on Oracle case sensitivity issues

When I use double quotes " to declare the table name, the column names are clearly case-sensitive!!!

Test example: Create an uppercase table structure

A brief discussion on Oracle case sensitivity issues

Since DESC is a reserved keyword here, you can only use " To work normally

Use the following statements to work normally:

A brief discussion on Oracle case sensitivity issues

A brief discussion on Oracle case sensitivity issues

A brief discussion on Oracle case sensitivity issues

Using the following statement does not work properly:

A brief discussion on Oracle case sensitivity issues


##Test example: Create lowercase table structure

A brief discussion on Oracle case sensitivity issues

It will work normally using the following statement:

A brief discussion on Oracle case sensitivity issues

Summary:

Oracle defaults to uppercase, which means that when " is not used to limit the table name and column name, the table name is just lowercase or uppercase, and finally becomes uppercase by default

When creating a table structure, if you use " to qualify the table name or column name, the generated table name or column name will be matched strictly according to the case in ", and it must be strictly matched in the query.

If a reserved keyword is used in SQL, the keyword must be qualified with ", and SQL will work normally.

2. Whether the query statement string is case-sensitive

Oracle is case-sensitive to the content in the string.

Data in the table:

A brief discussion on Oracle case sensitivity issues

Query results:

A brief discussion on Oracle case sensitivity issues

1A brief discussion on Oracle case sensitivity issues

Recommended tutorial: "

Oracle Tutorial"

The above is the detailed content of A brief discussion on Oracle case sensitivity issues. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template