先看postgresql的储存过程如下:
begin
declarev_rowcount int(10);
select * from A
if found then//当查询结果是true的话(即A表的数据>1时)
update B set flag=1;
GET DIAGNOSTICS v_rowcount:=ROW_COUNT;//v_rowcount为update B set flag=1更新影响的行数
END IF;
end
请教大家在mysql下有没有像postgresql中的found和 GET DIAGNOSTICS v_rowcount:=ROW_COUNT相关的用法?请指教!