我目前拥有的 sql 查询如下。我尝试了一些联合查询,但没有奏效。
Select file_path
from images
where image_id In (
Select image_id
from temp_images
where object_uid IN (
Select object_uid
from object_table
where object_status = 2 and object_place like "%some_keyword%"))`
Select object_uid, object_utitle
from object_table
where object_status = 2 and object_place like "%some_keyword%"`
两个查询可能返回许多行。我想像这样返回 file_path 和 object_uid 。
-Image_id | 对象_uid | Object_utitle
-img1 | 对象1 | 标题 1
-img2 | 对象2 | 标题 2
-img2 | 对象2 | 标题 3
有没有办法做到这一点?