SELECT * FROM TableC
INNER JOIN TableB ON TableB.mid=TableC.mid
INNER JOIN TableA ON TableA.userid=(
SELECT distinct userid
FROM TableB)
子查询返回超过 1 个值。
医学_硕士
MedicalID MedicalName
1(pk) abc
2 xyx
3 pqr
Child_Medical_Master
ChildMID MedicalID Station Name
1(pk) 1(fk) bnb mfk
2 1 def rwr
3 2 re wrw
医疗_访问
VTID PMID RFMID age
1(pk) 2(fk) 1 34
2 2 3 45
3 3 1 45
4 1 2 44
5 2 2 76
医学_研究
UID VTID ChildMID SMID Date time
1(pk) 1(fk) 1 1 kk jdj
2 2 3 2 kdf lfl
6 3 2 3 rgr rtr
博士_硕士
RFMID Doctorname
1(pk) mr.john
2 mr.jack
3 mr.jim
PAtient_Master
PMID Firstname LastNAme
1(pk) df ere
2 rwe rwer
3 rwr fwr
学习_硕士
SMID MedicalID Description Duration
1(pk) 1(fk) fdf efe
2 1 ddf dfdf
3 2 df ef
我想要表中的这些列应该如何成为我的正确查询?
UID,PMID,FIRSTNAME,LASTNAME,AGE,MEDICALNAME,DESCRIPTION,STATION,DATE,DoctorName