基本上,我要做的是:我想要一个sql查询,它返回id为的表中的所有行(一些子查询返回20个ID)。
就像那样:
SELECT * FROM People WHERE People.ID = (SELECT CreatedBy.PeopleID FROM CreatedBy)
答案 0 :(得分:1)
SELECT * FROM People WHERE People.ID in (SELECT CreatedBy.PeopleID FROM CreatedBy)
答案 1 :(得分:0)
使用'IN'
而不是'='
SELECT * FROM People WHERE People.ID IN (SELECT CreatedBy.PeopleID FROM CreatedBy)
答案 2 :(得分:0)
使用而不是=
SELECT * FROM People WHERE People.ID in (SELECT CreatedBy.PeopleID FROM CreatedBy)