给出以下两个表: - e1 |* r1 r! P2 X) W9 YPerson table id (pk) first middle last ageAddress table id(pk) person_id (fk person.id) street city state zip如何创建一个SQL句子,返回邮政编码为97229的人的所有信息? 0 M0 T9 d% b6 s% p ; O, }, R/ ^% q9 F& w5 [2 R9 L. ` 解决方案: : J0 M9 ~4 b: n9 b6 h Select * from people p,address a where p.id = a.person_id and a.zip='97229';否则,你必须 尝试 使用JOIN一种更有效、更好的方法,因为戈登在下面的评论中·利诺夫(Gordon Linoff)还说,你需要学习这一点。 9 i: K* X5 Q( l: }SELECT p.*,a.street,a.city FROM persons AS pJOIN address AS a ON p.id = a.person_idWHERE a.zip = '97299';这 p.*这意味着它将显示PERSONS所有列表。