create or replace procedure aa
as
var_count   int;
begin
select count(rownum) into var_count from tempteamtop where HOMETEAMID=teamid;
if var_count=0 then--如果select没有记录就去增加这个判断怎么写呀
insert into mytable();
else
update mytable
end if;
end;