oracle 中触发器创建问题?
我在普通用户下创建了序列和触发器:SQL>createsequenceseq_users_idincrementby1startwith1minvalue1nocache...
我在普通用户下创建了序列和触发器:
SQL> create sequence seq_users_id
increment by 1
start with 1
minvalue 1
nocache;
SQL> create or replace trigger tr_users
before insert on users
for each row
begin
select seq_users_id.nextval into :new.userId from dual;
end tr_users;
/
都显示创建成功,可是当我往里插入数据时就有问题了:
ORA-04098: 触发器 'SCOTT.YOUR_SEQ_USER' 无效且未通过重新验证
哪位高手帮帮忙这是怎么回事啊???是哪里有错啊???? 展开
SQL> create sequence seq_users_id
increment by 1
start with 1
minvalue 1
nocache;
SQL> create or replace trigger tr_users
before insert on users
for each row
begin
select seq_users_id.nextval into :new.userId from dual;
end tr_users;
/
都显示创建成功,可是当我往里插入数据时就有问题了:
ORA-04098: 触发器 'SCOTT.YOUR_SEQ_USER' 无效且未通过重新验证
哪位高手帮帮忙这是怎么回事啊???是哪里有错啊???? 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询