0
点赞
收藏
分享

微信扫一扫

postgresql存储函数/存储过程用sql语句来给变量赋值


--定义变量

a numeric;

方式一:

select  sqla into a from table1 where b = '1' ;    --这是sql语句赋值

 

方式二:

sql1:= 'select a from table1 where b = ' '1' '  ';

execute sql1 into a;  --这是执行存储函数赋值

举报

相关推荐

0 条评论