写Postgres存储过程时,不晓得怎么讲select查出的值赋值给变量,今天知道了用select INTO 

 

 

create or replace function "public"."getdescription"() returns varchar as

$body$
DECLARE

        temp varchar; 

BEGIN

        select code into temp from cfvariable where id=223;

        raise notice 'code %', temp; 

        return temp;

end
$body$
LANGUAGE 'plpgsql' volatile called on null input security invoker;

相关文章:

  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2021-06-24
  • 2022-01-04
相关资源
相似解决方案