create trigger a_tri before insert on a for each row begin if trim(translate(substr(:new.col_name,1,2),'abcdefg...xyz',' ')) is null and trim(translate(substr(:new.col_name,-1,5),'0123456789',' ')) is null then raise_applicateion_error(-2000,'出错'); end if; end; /
create trigger a_tri before insert on a for each row begin if trim(translate(substr(:new.col_name,1,2),'abcdefg...xyz',' ')) is null or trim(translate(substr(:new.col_name,-1,5),'0123456789',' ')) is null then raise_applicateion_error(-2000,'出错'); end if; end; / 不知道可以不可以
before insert on a
for each row
begin
if trim(translate(substr(:new.col_name,1,2),'abcdefg...xyz',' ')) is null and trim(translate(substr(:new.col_name,-1,5),'0123456789',' ')) is null then
raise_applicateion_error(-2000,'出错');
end if;
end;
/
before insert on a
for each row
begin
if trim(translate(substr(:new.col_name,1,2),'abcdefg...xyz',' ')) is null or trim(translate(substr(:new.col_name,-1,5),'0123456789',' ')) is null then
raise_applicateion_error(-2000,'出错');
end if;
end;
/
不知道可以不可以
在SQL*PLUS中执行,
没反应,不知道是不是语法上有什么问题?
小弟初学ORACLE,以前用的都是MS SQL。
请各位指点一二。