你可以用一种比较笨的办法做...
v_ncounts int;
begin
select count(*) into v_ncounts from table2
where table2id = :new.table1id;
if v_ncounts > 0 then
update table2
set name = :new.table1name
where table2id = :new.table1id;
else
insert into table2
values(
:new.table1id,
:new.table1name
)
end if
end
v_ncounts int;
begin
select count(*) into v_ncounts from table2
where table2id = :new.table1id;
if v_ncounts > 0 then
update table2
set name = :new.table1name
where table2id = :new.table1id;
else
insert into table2
values(
:new.table1id,
:new.table1name
)
end if
end
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货