易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 触发器问题 - Oracle / 高级技术

SQL code:

create or replace trigger article_log_file
after update or delete or insert
on article
for each row
begin
if updating then
insert into log_file values
(old.authorID,'update',old.artcleName,sysdate);

else if deleting then
insert into log_file values
(old.authorID,'delete',old.artcleName,sysdate);

else if inserting then
insert into log_file values
(new.authorID,'insert',new.artcleName,sysdate);
end if;
end;


虽然语句执行了,但编译器提示编译带有错误,而且我插入时也出现了错误,望指教,初学……
我数了下,end if 只有一个,if 却有3个。

if 要与 end if 匹配

else if 改为 elsif 试试

PL/SQL if语句语法
if <条件1> then
  <语句1>;
elsif <条件2> then
  <语句2>;
elsif <语句3> then
  ....
else
  <语句n>;
end if;


2楼还不睡觉? 够勤奋的

我睡觉去


create or replace trigger article_log_file
after update or delete or insert
on article
for each row
begin
  if updating then
  insert into log_file values
(old.authorID,'update',old.artcleName,sysdate);

  elseif deleting then
  insert into log_file values
(old.authorID,'delete',old.artcleName,sy


相关问答:

oracle 10g web登陆EM的问题? - Oracle / 基础和管理

安装了Oracle 10g,默认安装了orcl数据库,这个数据库能不能删除啊,还有我如果新建了其他数据库,怎么知道在web中登陆不同数据库的地址啊?

1
可以删除
2
在WEB地址栏中输入地址的时候指定新创建的数据库的IP ......

java怎么连接Oracle,急啊 - Java / Java相关

private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......

oracle 安装 01092 错误 - Oracle / 基础和管理

oracle 11g 安装 01092 错误,
日志信息:
[oracle@linux trace]$ vi alert_orcl.log 
MMON started with pid=14, OS id=9089
RESETLOGS after incomplete recovery UNTIL CHANGE 522752
Errors in file / ......

java连不上oracle? - Java / Java EE

java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186646784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBErro ......

请教一个oracle管理的问题! - Oracle / 基础和管理

服务器后台的数据库是oracle,在今天系统登录的时候报“登录不了数据库,IO异常”,结果是全公司都登不上去,我重启了一下服务器才好了,我想可能是用户并发量太大的缘故,不知道各位大虾认同不?有什么解决办法没? ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号