表1:面试额度编号表interview_apply
表2:面试人员表interview_person
表1和表2没有关联关系
要求:
每一个面试额度对应所有的面试人员查询数据:
查询第一个表数据:
select apply_id from interview_apply;
查询第二个表数据:
select person_id,name from interview_person;
两个查询结果合并到一起:
select a.id,b.person_id,b.name from
(select apply_id,"1" as param from interview_apply)a
left join
(select person_id,name,"1" as param from interview_person)b
on b.param = a.param