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

bamnm666 2009-09-25 09:54:20
CREATE TABLE T_Integration_GetServicePersonHaving
(
ID INTEGER NOT NULL,
Person_ID RAW(16) NULL,
ServiceType_ID INTEGER NULL,
Service_ID INTEGER NULL,
Service_Name varchar2(256) NULL,
Photo varchar2(1024) NULL,
Sort_ID INTEGER NULL,
System_ID INTEGER NULL
)

有什么错误吗
...全文
35174 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
liucheng335210510 2011-08-01
  • 打赏
  • 举报
回复
oracle中表明,列明,标识列字符不能超过30个
huangdachuan 2011-02-10
  • 打赏
  • 举报
回复
表名或者字段过长
ngx20080110 2009-09-25
  • 打赏
  • 举报
回复

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.

小灰狼W 2009-09-25
  • 打赏
  • 举报
回复
规定不能超过30个字符
你应该可以缩短这个长度的,实在没有必要
看起来也难受
cosio 2009-09-25
  • 打赏
  • 举报
回复
表名太长了!

CREATE TABLE T_Integration_GetService
(
ID INTEGER NOT NULL,
Person_ID RAW(16) NULL,
ServiceType_ID INTEGER NULL,
Service_ID INTEGER NULL,
Service_Name varchar2(256) NULL,
Photo varchar2(1024) NULL,
Sort_ID INTEGER NULL,
System_ID INTEGER NULL
)

就可以了!
bamnm666 2009-09-25
  • 打赏
  • 举报
回复
表名太长还不行?
小灰狼W 2009-09-25
  • 打赏
  • 举报
回复
表名太长
cosio 2009-09-25
  • 打赏
  • 举报
回复
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.

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧