Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试在单个批次中发送多个选择失败并显示错误消息:
批处理中的无效语句:只允许 UPDATE、INSERT 和 DELETE 语句。
发送多个不同查询的最佳方式是什么(例如 id=x、id=y、id=z)。
您不能为选择执行此操作,而且恕我直言,这真的没有意义。将每个查询作为单独的请求发送并收集结果。
如果 where 条件“相同”,您可以使用 IN 运算符,尽管它可能会增加协调器的负载。喜欢,where id IN (x, y, z)
where id IN (x, y, z)