这是数据库结构 有大佬知道吗
select * from 文章表 where articleID in (select articleID from 评论表 where userID = 你的用户的id)
表设计的有问题:文章表不应该有评论id。如果采用现在的表结构,可以采用以下语句:select * from table2 t2 where t2.articleId in (select distinict artcleId from table1 t1),或者使用exists