postgres数据库字段类型不匹配问题
报错信息
No operator matches the given name and argument types
SELECT (select name from B where B.id = A.id) FROM A
这里B表id是Integer A Id是String
类型不一致报错
解决方案:
SELECT (select name from B where B.id = A.id :: INTEGER) FROM A
:: 转换类型
postgres数据库字段类型不匹配问题No operator matches the given name and argument types
最新推荐文章于 2023-03-15 15:25:08 发布