Home >Database >Mysql Tutorial >ORA-00904/ORA-00942和Oracle 大小写区分

ORA-00904/ORA-00942和Oracle 大小写区分

WBOY
WBOYOriginal
2016-06-07 17:31:491381browse

Oracle数据库中各种对象(包括表,列,索引等)默认不区分大小写,在数据字典中一律用大写。假如用户在建表(包括外部表)时,将

Oracle数据库中各种对象(包括表,,列,索引等)默认不区分大小写,在数据字典中一律用大写。假如用户在建表(包括外部表)时,将列名/表名用双引号括起,这些都成为大小写区分的数据库对象。这时select 时需要严格按照建表时的大小写才能成功,否则返回ORA-000904或ORA-00942错误。

某些软件可以帮助用户自动产生Create table语句,这时需要将双引号去掉。否则会产生上述错误。

create table "t" ( "a" int );
table "t" created.

select A from T;
ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:   
*Action:
Error at Line: 16 Column: 15


select A from "t";
ORA-00904: "A": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:   
*Action:
Error at Line: 16 Column: 8

相关阅读:

SPFILE 错误导致数据库无法启动(ORA-01565)

ORA-01172、ORA-01151错误处理

ORA-00600 [2662]错误解决

ORA-01078 和 LRM-00109 报错解决方法

linux

Statement:
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