Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将记录插入表中,但出现错误 -
'ORA-01400: cannot insert NULL into (....'. 表结构为:
我从 Mysql 迁移到 Oracle。
在 Mysql 上这工作,但在 Oracle 上它不工作。我怎样才能解决这个问题?我是否需要编写所有列插入查询或取消选择非空选项
尝试这个:
create or replace trigger EDITIONS_COR before insert or update on EDITIONS for each row begin if INSERTING then select EDITIONS_SEQ.nextval into :new.ID from DUAL; end if; :new.CORDATE:=SYSDATE; :new.USERNAME:=USER; end;