错误[42883]:operator does not exist:character varying = integer
修复建议:no operator matches the given name and argument type(s). You might need to add explicit type casts.
错误原因: 字段是字符串类型,sql查询时却用int型表示。
例如:表结构
create table user(
id int,
name varcher,
age archer
)
这里的age是字符串类型,但是查询的sql语句是用int型表示:
select * from user where age > 10;
正确的sql应该是select * from user where age > ’10’;