- 论坛徽章:
- 0
|
execute 'select count(*) from temp_crm_info_t where searchengine_id = $1' into count
using in_searchengine_id;
return count;
----------------------存储过程里嵌入了上面的一段sql语句,执行的时候报如下错误:
ERROR: syntax error at or near "using"
LINE 21: using in_searchengine_id;
^
********** 错误 **********
ERROR: syntax error at or near "using"
SQL 状态: 42601
字符:1416
----------------------------------------------看手册的时候,因为我英语不是太好,感觉我那么写没什么问题
EXECUTE ’SELECT count(*) FROM ’
|| tabname::regclass
|| ’ WHERE inserted_by = $1 AND inserted <= $2’
INTO c
USING checked_user, checked_date;
-----------------------------------------------postgresql-9.2-A4:1046页 |
|