PostgreSQL - ERROR: could not determine data type of parameter $1

沈芏

关注

阅读 124

2022-05-18


SQL

LIKE CONCAT('%', #{apiPageBo.apiName}, '%')


报错


ERROR: could not determine data type of parameter $7



分析

大概意思指的是:无法确定参数类型,只需要对 #{apiPageBo.apiName} 进行类型转换就行,给它一个明确的类型即可。


解决

LIKE CONCAT('%', #{apiPageBo.apiName}::text, '%')


精彩评论(0)

0 0 举报