先把两张表进行连接,根据学校的名字进行连接 select a.device_id device_id,a.question_id question_id,a.result result from question_practice_detail a,user_profile b where b.device_id = a.device_id and university = '浙江大学'