gpt4 book ai didi

mysql - 在 MySQL 中检索多行

转载 作者:太空宇宙 更新时间:2023-11-03 11:04:51 25 4
gpt4 key购买 nike

我有一个手动列出的 uniqueID 列表,我想从我的 MySQL 数据库中检索它。截至目前,我正在使用:

Select * from TABLE where uniqueID = "111" or uniqueID = "124" or uniqueID = "220"...

显然这非常耗时。 uniqueID 的列表不写在任何文件中。我只是想要更高效的查询来告诉数据库检索具有 uniqueID 的行。有没有类似的东西,

Select * from TABLE where uniqueID = {"111", "124", "220"...}

我可以使用吗?

谢谢。

最佳答案

Select * from TABLE where uniqueID IN ('111','124','220',...)

关于mysql - 在 MySQL 中检索多行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12645694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com