Oracle中的强制标识符区分大小写 [英] Force identifier case sensitivity in oracle

查看:83
本文介绍了Oracle中的强制标识符区分大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在oracle中,当一个人使用不带引号的标识符时,它们被大写.换句话说,这两个语句是等效的:

In oracle, when one uses non-quoted identifiers, they are silently capitalized. In other words these two statements are equivalent:

SELECT name FROM my_table
SELECT "NAME" FROM "MY_TABLE"

是否有任何方法可以停止无声大写,以便使以下语句等效?

Is there any way to stop the silent capitalization, so that the following statements become equivalent?

SELECT name FROM my_table
SELECT "name" FROM "my_table"

推荐答案

否,很遗憾,您无法自定义

No, unfortunately you can't customize how Oracle interprets your identifiers:

请注意,Oracle对以下名称的解释相同,因此不能将它们用于同一名称空间中的不同对象:

Note that Oracle interprets the following names the same, so they cannot be used for different objects in the same namespace:

employees
EMPLOYEES
"EMPLOYEES"

将未加引号的标识符转换为大写是很方便的(向后兼容吗?)(内部所有对象名称都区分大小写).

It is a convenience (backward compatibility?) that non-quoted identifiers are converted to upper-case (internally all object names are case-sensitive).

这篇关于Oracle中的强制标识符区分大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆