select o.score own_score, f.score fall_score, n.countsum presure_score from (select score,patient_id from OWN_RECORD where patient_id = '00807004' and visit_id = '1' and rownum = 1) o join (select score,patient_id from FALL_ES where patient_id = '00807004' and visit_id = '1' and rownum = 1) f join (select countsum, pid from NURSING_RECORD_PRESSURE where pid = '00807004' and vid='1' ) n on o.patient_id = f.patient_id and f.patient_id = n.pid
报错:missing keyword。
请问错在哪里?
select o.score own_score, f.score fall_score, n.countsum presure_score from (select score,patient_id from OWN_RECORD where patient_id = '00807004' and visit_id = '1' and rownum = 1) o join (select score,patient_id from FALL_ES where patient_id = '00807004' and visit_id = '1' and rownum = 1) f on o.patient_id = f.patient_id join (select countsum, pid from NURSING_RECORD_PRESSURE where pid = '00807004' and vid='1' ) n on f.patient_id = n.pid
on条件一个一个来
怎么写?请教。
一个join/inner join/left join/right join 后面一定要有一个 on 作为关联条件