更新时间:2021-07-26 00:38:02
在SO中曾有人问过这个问题.放入响应,这样可能有助于给出一些背景信息,并帮助@brisk继续阅读此类错误.
This question has been asked before in SO. Putting in a response so it might help to give some context and help @brisk read this sort of error going forward.
问题在于它将'foo_ids'作为字符串而不是单个值.因此,它实际上是在尝试运行:
The problem is that it is taking 'foo_ids' as a string and not as individual values. So it's essentially trying to run:
select bar_id from foo where foo_id in ('16600, 16602, 16607, 16609, 16611, 16613')
注意报价吗?您希望它运行:
Notice the quotes? You want it to run:
select bar_id from foo where foo_id in (16600, 16602, 16607, 16609, 16611, 16613)
因此,当您报告错误时,它会在数字周围包含引号".
so when you reported your error, it included 'quotes' around the numbers.