oracle - 无效的 ALTER TABLE 选项 ORA-01735
问题描述
我正在寻找向我在 oracle apex 中的现有表中添加一个标识列,但我收到了无效的 ALTER TABLE 选项错误。我一直在搜索很多关于这个错误的线程,但我似乎找不到任何对这个特定问题有帮助的东西。
ALTER TABLE tbl_Customer
ADD Customer_ID int Identity(1,1);
感谢您查看任何可能有用的帖子的链接,我将不胜感激。
解决方案
语法错误。应该
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 有关)。
推荐阅读
- c++ - 如何在 C++ COM STA 中的 WebView2 接口上等待对 ExecuteScript 的调用完成
- google-apps-script - 将一系列单元格从一行移动到另一个谷歌工作表并将其删除
- python - Pandas 时间戳在强制转换为唯一列表时转换为整数 - 可能的错误?
- loops - 使用循环时播放回顾不显示所有失败
- performance - 向 Azure 事件中心发送事件时的高延迟
- oracle - PLS-00306:调用 'GET_LINE' 时参数的数量或类型错误。在 PL/SQL 中的函数中传递字符串参数时出现此错误
- twig - TWIG - 按项目类别划分列
- c# - 给定代码中员工 emp 的需求是什么?
- python - div Web Scrape on site output 返回无
- javascript - 第一次调用 ReactContext 将 isLoading 状态设置为 false