Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
表:
PERSON
Has_Visited
Belongs_To
根据以下信息,创建此问题:
去过“伦敦”这个城市的人叫什么名字?
Select p.Name from person p,has_visited hs where p.ssn= hs.ssn and hs.city= 'LONDON'
只需使用in运算符:
in
SELECT name FROM person WHERE ssn IN (SELECT ssn FROM has_visited WHERE city = 'London');