首页 > 解决方案 > 无效的 ALTER TABLE 选项 ORA-01735

问题描述

我正在寻找向我在 oracle apex 中的现有表中添加一个标识列,但我收到了无效的 ALTER TABLE 选项错误。我一直在搜索很多关于这个错误的线程,但我似乎找不到任何对这个特定问题有帮助的东西。

ALTER TABLE tbl_Customer
ADD Customer_ID int Identity(1,1);

感谢您查看任何可能有用的帖子的链接,我将不胜感激。

标签: oracleoracle-apex

解决方案


语法错误。应该

SQL> create table tbl_customer (name varchar2(20));

Table created.

SQL> alter table tbl_customer add customer_id int generated always as identity;

Table altered.

SQL>

此外,您没有使用 MySQL,因为您遇到了 ORA-01735 错误(与 Oracle 有关)。


推荐阅读