createor replace
procedure ups(xa number)asbeginmergeinto mergetest m using dual on(a = xa)whennotmatchedtheninsert(a,b)values(xa,1)whenmatchedthenupdateset b = b+1;end ups;/droptable mergetest;createtable mergetest(a number, b number);
call ups(10);
call ups(10);
call ups(20);select*from mergetest;