表结果如下:
名称 是否为空? 类型
----------------------------------------- -------- ----------------- USER_ID NUMBER
USER_NAME VARCHAR2(15)
USER_PASSWORD VARCHAR2(15)触发器如下:
create or replace trigger sport_login_bir
before insert on sport_login
for each row
begin
insert into sport_login(user_id) values(sport_seq.nextval);
end;执行:insert into sport_login(user_name,user_password) values('002','002');
结果提示出错:
ERROR 位于第 1 行:
ORA-00036: 超过递归 SQL (50) 级的最大值
ORA-06512: 在"SCOTT.SPORT_LOGIN_BIR", line 2
ORA-04088: 触发器 'SCOTT.SPORT_LOGIN_BIR' 执行过程中出错
ORA-06512: 在"SCOTT.SPORT_LOGIN_BIR", line 2
ORA-04088: 触发器 'SCOTT.SPORT_LOGIN_BIR' 执行过程中出错
ORA-06512: 在"SCOTT.SPORT_LOGIN_BIR", line 2
ORA-04088: 触发器 'SCOTT.SPORT_LOGIN_BIR' 执行过程中出错
ORA-06512: 在"SCOTT.SPORT_LOGIN_BIR", line 2
ORA-04088: 触发器 'SCOTT.SPORT_LOGIN_BIR' 执行过程中出错
请问大虾位这是怎么回事呀?
解决方案 »
- 向ORACLE中插入特殊字符 求助
- oracle 10g web打不开em
- ORA-12518, TNS:listener could not hand off client connection
- 很鬼马的 无法从套接字读取更多的数据
- 如何将一个表中符合特定条件的所有纪录插入另外一个表
- 怎么在oracle中批量读取和更新数据库的列
- 咨询:关于Oracle9i的问题!
- 如何获取一个表空间下已有的所有表名?(在线等待)
- 请问developer/2000,谢谢
- oracle启动监听配置文件出现下面该怎么解决
- 请教关于Oracle外部认证的问题!谢谢!
- 求个EXP备份命令的写法............
create or replace trigger sport_login_bir
before insert on sport_login
for each row
begin
select sport_seq.nextval into :new.user_id from dual;
end;
before insert on sport_login
for each row
begin
insert into sport_login(user_id) values(sport_seq.nextval);
end;错误提示非常明确了,一个死循环的递归调用在表sport_login上创建的插入触发器中继续对表sport_login进行插入,所以再次触发触发器,触发器中又对表进行插入,又触发了插入触发器,继续插入,继续触发