扫码关注官方订阅号
如题,举例说明下,假如where in (1,2,3,2,5,3);其中2,3都有重复的,想要让查出的记录数量和in中的相同,重复的也会显示重复的记录,就是得出的记录是6条。
走同样的路,发现不同的人生
in有重复没办法,我能知道的就是select * from xxx where in (1,2,3,5)union allselect * from xxx where in (2,3)自己在外边先把重复的挑出来
用union all链接做查询
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
in有重复没办法,我能知道的就是
select * from xxx where in (1,2,3,5)
union all
select * from xxx where in (2,3)
自己在外边先把重复的挑出来
用union all链接做查询