postgresql 赋值注意

在函数里面赋值需要注意以下

定义变量是在begin前

变量赋值时使用 :=

select 中赋值使用into

如下:

create or replace...

return i int

declare

value int;

begin

value:=100;

select  id into value from table_name

end