你的位置:首页 > 数据库

[数据库]sql联合查询多个表


SELECT hp_patient.name, hp_ptorders.DrugName, hp_ptorders.Dosage,hp_ptorders.DosageUnit
FROM hp_patient
LEFT JOIN hp_ptorders
ON hp_patient.pid=hp_ptorders.PtId
ORDER BY hp_patient.name