1. 使用exsits 如下:
do
$$
    begin
    if exists(select * from res_partner where 1!=1) then
        raise notice 'ererrrr';
    end if;
    end;
$$;
  1. 还有一种比较蠢的方法:使用count 来获取返回的结果,然后判断count的值是否为零.

相关文章:

  • 2021-12-10
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
相关资源
相似解决方案