表模型下使用or语句查询条件存在不存在的id,查询出来的接果中,id存在的数据有重复 #16571
Closed
silence-tt
started this conversation in
General
Replies: 2 comments 2 replies
-
用的是哪个版本呢,我在 2.0.5 中没有复现 |
Beta Was this translation helpful? Give feedback.
1 reply
-
我 用 in 的形式和 a ='11' or a='22' 的方式都试了下,没有出现这个问题,你也可以在 2.0.5 版本中尝试一下 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
在表模型下使用select * from xxx.table where device_id in ('11111','22222','33333') ,当11111这个device_id在表中不存在,会使22222的数据出现重复行,但是使用select * from xxx.table where device_id = '22222'查询确认重复的数据实际在表中只有一条。将11111在条件中去除后,查询数据正常。下面附上了查询的截图,以及验证是否有重复数据的截图


想请教一下这个有什么好的方式避免吗?或者是我语法使用上有什么不正确吗,感谢
Beta Was this translation helpful? Give feedback.
All reactions