17,377
社区成员
发帖
与我相关
我的任务
分享
create or replace trigger tri_val_info
before insert on tablename
for each row
declare
num int;
myexp exception;
begin
select count(*) into num from score where columnname.length<>18;
if num>0 then
raise myexp;
end if;
exception
when myexp then raise_application_error('-20002', '身份证长度有误,无法完成插入!');
end;