您好,我有以下可用的 Mysql 代码,但我想知道是否有更好、更短、更有效的方法来实现它?
select
images.*,
posts.*
from
mjbox_images AS images,
mjbox_posts AS posts
where
images.post_id = 3 AND posts.post_id = 3
最佳答案
SELECT * FROM mjbox_images JOIN mjbox_posts USING (post_id) WHERE post_id = 3
关于Mysql - 是否有更好的方法从具有相同 ID 的两个表中检索数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10900196/