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

A brief discussion on Oracle case sensitivity issues

青灯夜游
青灯夜游forward
2020-05-12 13:17:195034browse

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete
Previous article:oracle undo analysisNext article:oracle undo analysis