--创建表:
Create table scott.test
(
ID int,
name varchar2(50)
);--创建触发器:
--在执行insert语句后再插入一条记录
Create or replace trigger scott.test_trigger
after insert
on scott.test
Declare
aa varchar(50):='created by Trigger';
ii int:=0;
Begin select max(ID)
into ii
from scott.test
if(ii = null) then
ii:=0;
end if;
Insert into scott.test
select ii+1,aa
from dual;
DBMS_OUTPUT.PUT_LINE('Trigger ok!');End scott.test_trigger; --插入一条记录:
Insert into scott.test
select '1','Create By Edgar'
from dual;报错信息:
触发器'scott.test_trigger'无效且未通过重新验证请问错在何处?
Create table scott.test
(
ID int,
name varchar2(50)
);--创建触发器:
--在执行insert语句后再插入一条记录
Create or replace trigger scott.test_trigger
after insert
on scott.test
Declare
aa varchar(50):='created by Trigger';
ii int:=0;
Begin select max(ID)
into ii
from scott.test
if(ii = null) then
ii:=0;
end if;
Insert into scott.test
select ii+1,aa
from dual;
DBMS_OUTPUT.PUT_LINE('Trigger ok!');End scott.test_trigger; --插入一条记录:
Insert into scott.test
select '1','Create By Edgar'
from dual;报错信息:
触发器'scott.test_trigger'无效且未通过重新验证请问错在何处?
解决方案 »
- 求解高手,oracle存储过程执行查询的性能
- 一个很简单的问题(关于oracle的用户管理)
- 不同帐号连接oracle的速度差别很大是为什么?
- 求教关于函数索引的问题
- powerdesigner修改已有数据的oracle结构,总是报错,约束,视图,触发器,包都不好使
- 有关$ORACLE_HOME/bin/sqlldr 问题
- java读取oracle的时候无法读取到最新的数据
- oracle 函数问题:java.sql.SQLException:ORA-01000:超出打开游标的最大数
- 查询问题?
- 怎么是oracle报ora4030的错误,改操作系统的什么参数
- 写如Oeacle的BLOB字段遇见的问题
- Oracle 从表外键索引问题
select ii+1,aa
from scott.test;