- 论坛徽章:
- 0
|
写了个存储过程。里面嵌入了这么条语句。
execute 'select count(*) from temp_crm_info_t where searchengine_id = $1' into count
using in_searchengine_id;
return count;
-------------------------------------------------------编译的时候报错
ERROR: syntax error at or near "using"
LINE 21: using in_searchengine_id;
^
********** 错误 **********
ERROR: syntax error at or near "using"
SQL 状态: 42601
字符:1415
---------------------------------------------但是我查参考手册postgresql-9.2-A4.pdf
里面是有类似写法的。
EXECUTE ’SELECT count(*) FROM ’
|| tabname::regclass
|| ’ WHERE inserted_by = $1 AND inserted <= $2’
INTO c
USING checked_user, checked_date;
---------------------------------------------请懂行的帮忙指点一下,谢谢
|
|