oracle 标示符太长,Oracle建表时为什么提示“ORA-00972:标识符过长

ORA-00972 identifier is too long

Cause: The name of a schema object exceeds 30 characters. Schema objects are tables, clusters, views, indexes, synonyms, tablespaces, and usernames.

Action: Shorten the name to 30 characters or less.

1.Names must be from 1 to 30 bytes long with these exceptions: ◦Names of databases are limited to 8 bytes. ◦Names of database links can be as long as 128 bytes. If an identifier includes multiple parts separated by periods, then each attribute can be up to 30 bytes long. Each period separator, as well as any surrounding double quotation marks, counts as one byte. For example, suppose you identify a column like this: "schema"."table"."column" The schema name can be 30 bytes, the table name can by 30 bytes, and the column name can be 30 bytes. Each of the quotation marks and periods is a single-byte character, so the total length of the identifier in this example can be up to 98 bytes.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: ORA-00904错误是Oracle数据库中的一个常见错误,它表示标识符无效。这个错误通常有几种可能的原因。首先,可能是因为列名写错,表中没有那个字段。在执行查询语句,需要确保列名的正确性。另外,有候在查询语句中需要加上租户名,比如表A是common租户下的,需要使用select * from common.A来查询。\[1\]在使用JPA或者MyBatis集成Oracle进行where查询,也可能出现ORA-00904错误。这可能是因为在代码中引用了无效的标识符,比如字段名写错或者包含了Oracle中的关键字。在这种情况下,需要检查代码中的字段名和表名的正确性,并确保使用双引号括起来。\[2\]\[3\]根据你提供的信息,JIAN建表SQL错误\[904\] \[42000\]: ORA-00904: : 标识符无效,可能是因为建表语句中的字段或表名没有正确地使用双引号括起来。请检查建表语句中的字段和表名,并确保使用双引号括起来以避免ORA-00904错误的发生。 #### 引用[.reference_title] - *1* [Oracle报错ORA-00904: 标识符无效](https://blog.csdn.net/HelloJavaE2/article/details/122637801)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [ORA-00904:标识符无效(太坑了!!)](https://blog.csdn.net/weixin_47356053/article/details/125621613)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [[Error Code: 904, SQL State: 42000] ORA-00904 : 标识符无效](https://blog.csdn.net/hyfstyle/article/details/121121331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值